最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - Having issues installing discord - Stack Overflow

programmeradmin2浏览0评论

I am using python==3.12.9, tried installing using command pip install discord.py

# first error i encountered was
 C:\Users\khanh\AppData\Local\Temp\pip-build-env-ak7vjcgm\overlay\lib\python3.12\site-packages\setuptools\command\build_py.py:212: _Warning: Package 'aiohttp._websocket' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'aiohttp._websocket' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'aiohttp._websocket' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - .html

          If you don't want 'aiohttp._websocket' to be distributed and are
          already explicitly excluding 'aiohttp._websocket' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - .html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************
                   from aiohttp/_websocket/mask.c:16:
  C:\msys64\mingw32/include/python3.12/pyport.h:230:77: fatal error: ieeefp.h: No such file or directory
   #include <ieeefp.h>  /* needed for 'finite' declaration on some platforms */
                                                                               ^
  compilation terminated.
  error: command 'C:\\MinGW\\bin\\gcc.EXE' failed with exit code 1
  [end of output]

So first thing I did was install vscode C++ build tools, but in side my virtual environment it keeps using MinGW which i don't know how to handle (I did successfully installed discord globally). It is some problem with aiohttp dependencies but how should i resolve it.

I am using python==3.12.9, tried installing using command pip install discord.py

# first error i encountered was
 C:\Users\khanh\AppData\Local\Temp\pip-build-env-ak7vjcgm\overlay\lib\python3.12\site-packages\setuptools\command\build_py.py:212: _Warning: Package 'aiohttp._websocket' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'aiohttp._websocket' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'aiohttp._websocket' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'aiohttp._websocket' to be distributed and are
          already explicitly excluding 'aiohttp._websocket' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************
                   from aiohttp/_websocket/mask.c:16:
  C:\msys64\mingw32/include/python3.12/pyport.h:230:77: fatal error: ieeefp.h: No such file or directory
   #include <ieeefp.h>  /* needed for 'finite' declaration on some platforms */
                                                                               ^
  compilation terminated.
  error: command 'C:\\MinGW\\bin\\gcc.EXE' failed with exit code 1
  [end of output]

So first thing I did was install vscode C++ build tools, but in side my virtual environment it keeps using MinGW which i don't know how to handle (I did successfully installed discord globally). It is some problem with aiohttp dependencies but how should i resolve it.

Share Improve this question asked Mar 3 at 11:54 khanzalakhanzala 235 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Try the installation steps found on PyPI:

# Linux/macOS
python3 -m pip install -U discord.py

# Windows
py -3 -m pip install -U discord.py

Also, this could be an issue of your Python version not having a proper aiohttp build to install, so try manually installing a specific version of aiohttp as seen here:
pip install aiohttp==3.9.0rc0

发布评论

评论列表(0)

  1. 暂无评论