Не получается установить модуль discord.py, через стандартное pip install discord.py. Если ошибка очень глупая, сильно извиняюсь так как только учусь

D:\python>pip install discord.py
Collecting discord.py
  Using cached discord.py-1.7.3-py3-none-any.whl (786 kB)
Collecting aiohttp<3.8.0,>=3.6.0
  Using cached aiohttp-3.7.4.post0.tar.gz (1.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Даня\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\Даня\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\C182~1\AppData\Local\Temp\tmpd_kz6su0'
         cwd: C:\Users\Даня\AppData\Local\Temp\pip-install-4xkavxdx\aiohttp_0c80200336764a86bc872cddf8738fe9
    Complete output (25 lines):
    Error in sitecustomize; set PYTHONVERBOSE for traceback:
    SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe4 in position 0: invalid continuation byte (sitecustomize.py, line 7)
    running dist_info
    creating C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info
    writing C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\PKG-INFO
    writing dependency_links to C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\dependency_links.txt
    writing requirements to C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\requires.txt
    writing top-level names to C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\top_level.txt
    writing manifest file 'C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\SOURCES.txt'
    reading manifest file 'C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'aiohttp' anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    warning: no previously-included files matching '*.lib' found anywhere in distribution
    warning: no previously-included files matching '*.dll' found anywhere in distribution
    warning: no previously-included files matching '*.a' found anywhere in distribution
    warning: no previously-included files matching '*.obj' found anywhere in distribution
    warning: no previously-included files found matching 'aiohttp\*.html'
    no previously-included directories found matching 'docs\_build'
    adding license file 'LICENSE.txt'
    writing manifest file 'C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.egg-info\SOURCES.txt'
    creating 'C:\Users\Даня\AppData\Local\Temp\pip-modern-metadata-0m4kndn2\aiohttp.dist-info'
    error: invalid command 'bdist_wheel'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/99/f5/90ede947a3ce2d6de1614799f5fea4e93c19b6520a59dc5d2f64123b032f/aiohttp-3.7.4.post0.tar.gz#sha256=493d3299ebe5f5a7c66b9819eacdcfbbaaf1a8e84911ddffcdc48888497afecf (from https://pypi.org/simple/aiohttp/) (requires-python:>=3.6). Command errored out with exit status 1: 'C:\Users\Даня\AppData\Local\Programs\Python\Python310\python.exe' 'C:\Users\Даня\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\C182~1\AppData\Local\Temp\tmpd_kz6su0' Check the logs for full command output.

Ответы (1 шт):

Автор решения: Anaconda
  1. Добавьте pip в переменные среды, то есть переустановите Python и при установке поставьте галочку в пункте Add pip to path (у меня была такая же проблема и пункт 1 работает 100% - сам проверял). А уже после пропишите pip install discord.py

  2. Лично я этот способ не проверял, но кому-то он помог: https://www.youtube.com/watch?v=hqLN2vKpq7Q

P.S. А вообще я уже сталкивался с такой ошибкой (см. тут) и способ 1 очень помог.

→ Ссылка