3

I recently updated to Python 3.9. While trying to install the dependencies to code a bot for my Discord Server, the Windows Powershell console spit out an error. The log, including the error, is below. I'm not sure what to do. Any help would be appreciated. I'm on Windows 10.


    Collecting discord.py
  Using cached discord.py-1.5.0-py3-none-any.whl (699 kB)
Collecting aiohttp<3.7.0,>=3.6.0
  Using cached aiohttp-3.6.2-py3-none-any.whl (441 kB)
Collecting multidict<5.0,>=4.5
  Using cached multidict-4.7.6.tar.gz (50 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting attrs>=17.3.0
  Using cached attrs-20.2.0-py2.py3-none-any.whl (48 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.6.0.tar.gz (175 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting async-timeout<4.0,>=3.0
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting chardet<4.0,>=2.0
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna>=2.0
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Building wheels for collected packages: multidict, yarl
  Building wheel for multidict (PEP 517): started
  Building wheel for multidict (PEP 517): finished with status 'error'
pip :   ERROR: Command errored out with exit status 1:
At line:1 char:1
+ pip install -U discord.py 2>&1 | tee -filepath c:\users\drago\desktop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (  ERROR: Comman... exit status 1::String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
   command: 'c:\users\drago\appdata\local\programs\python\python39\python.exe' 
'c:\users\drago\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' 
build_wheel 'C:\Users\drago\AppData\Local\Temp\tmpqtrgsff9'
       cwd: C:\Users\drago\AppData\Local\Temp\pip-install-dtjlyufp\multidict
  Complete output (44 lines):
  **********************
  * Accellerated build *
  **********************
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\multidict
  copying multidict\_abc.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\_compat.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\_multidict_base.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\_multidict_py.py -> build\lib.win-amd64-3.9\multidict
  copying multidict\__init__.py -> build\lib.win-amd64-3.9\multidict
  running egg_info
  writing multidict.egg-info\PKG-INFO
  writing dependency_links to multidict.egg-info\dependency_links.txt
  writing top-level names to multidict.egg-info\top_level.txt
  reading manifest file 'multidict.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files found matching 'multidict\_multidict.html'
  warning: no previously-included files found matching 'multidict\*.so'
  warning: no previously-included files found matching 'multidict\*.pyd'
  warning: no previously-included files found matching 'multidict\*.pyd'
  no previously-included directories found matching 'docs\_build'
  writing manifest file 'multidict.egg-info\SOURCES.txt'
  copying multidict\__init__.pyi -> build\lib.win-amd64-3.9\multidict
  copying multidict\_multidict.c -> build\lib.win-amd64-3.9\multidict
  copying multidict\py.typed -> build\lib.win-amd64-3.9\multidict
  creating build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\defs.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\dict.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\istr.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\iter.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\pair_list.h -> build\lib.win-amd64-3.9\multidict\_multilib
  copying multidict\_multilib\views.h -> build\lib.win-amd64-3.9\multidict\_multilib
  running build_ext
  building 'multidict._multidict' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\multidict
  cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\drago\appdata\local\programs\python\python39\include 
-Ic:\users\drago\appdata\local\programs\python\python39\include /Tcmultidict/_multidict.c 
/Fobuild\temp.win-amd64-3.9\Release\multidict/_multidict.obj -O2
  error: command 'cl.exe' failed: None
  ----------------------------------------

  ERROR: Failed building wheel for multidict

  Building wheel for yarl (PEP 517): started
  Building wheel for yarl (PEP 517): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\drago\appdata\local\programs\python\python39\python.exe' 
'c:\users\drago\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' 
build_wheel 'C:\Users\drago\AppData\Local\Temp\tmpl23ue1yv'
       cwd: C:\Users\drago\AppData\Local\Temp\pip-install-dtjlyufp\yarl
  Complete output (39 lines):
  **********************
  * Accellerated build *
  **********************
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\yarl
  copying yarl\_quoting.py -> build\lib.win-amd64-3.9\yarl
  copying yarl\_quoting_py.py -> build\lib.win-amd64-3.9\yarl
  copying yarl\_url.py -> build\lib.win-amd64-3.9\yarl
  copying yarl\__init__.py -> build\lib.win-amd64-3.9\yarl
  running egg_info
  writing yarl.egg-info\PKG-INFO
  writing dependency_links to yarl.egg-info\dependency_links.txt
  writing requirements to yarl.egg-info\requires.txt
  writing top-level names to yarl.egg-info\top_level.txt
  reading manifest file 'yarl.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '*.cache' found anywhere in distribution
  warning: no previously-included files found matching 'yarl\*.html'
  warning: no previously-included files found matching 'yarl\*.so'
  warning: no previously-included files found matching 'yarl\*.pyd'
  no previously-included directories found matching 'docs\_build'
  writing manifest file 'yarl.egg-info\SOURCES.txt'
  copying yarl\__init__.pyi -> build\lib.win-amd64-3.9\yarl
  copying yarl\_quoting_c.c -> build\lib.win-amd64-3.9\yarl
  copying yarl\_quoting_c.pyi -> build\lib.win-amd64-3.9\yarl
  copying yarl\_quoting_c.pyx -> build\lib.win-amd64-3.9\yarl
  copying yarl\py.typed -> build\lib.win-amd64-3.9\yarl
  running build_ext
  building 'yarl._quoting_c' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\yarl
  cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\drago\appdata\local\programs\python\python39\include 
-Ic:\users\drago\appdata\local\programs\python\python39\include /Tcyarl/_quoting_c.c 
/Fobuild\temp.win-amd64-3.9\Release\yarl/_quoting_c.obj
  error: command 'cl.exe' failed: None
  ----------------------------------------

  ERROR: Failed building wheel for yarl

Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly

Thanks all. My knowledge of Python is still pretty limited, so I'm not sure how to go about fixing something if a package "cannot be installed directly."

R3TURN-0
  • 83
  • 1
  • 9
  • It doesn't work out of the box for python 3.9 yet. `multidict` doesn't have wheels ready for 3.9 yet: https://github.com/aio-libs/multidict/issues/534. `yarl` does not have wheels ready for 3.9: https://github.com/aio-libs/yarl/issues/526, and when pip looks for the compiler `cl.exe` it doesn't find it and fails. – tgikal Oct 07 '20 at 20:12
  • If you're interested in remaining with python 3.9 and want to try compiling them yourself: https://stackoverflow.com/questions/41724445/python-pip-on-windows-command-cl-exe-failed Otherwise just use a 3.8 version: https://www.python.org/downloads/release/python-386/ – tgikal Oct 07 '20 at 20:25

2 Answers2

1

Try using Python 3.8.6(uninstall 3.9 and install 3.8.6 from official site).

  • This is the correct answer. But after installing you need to make sure your terminal is using the correct `pip` and other scripts, I had the issue where it was still using 3.9 pip to install Discord. You can set this temporarily (for the cmd session) by doing something like: set PATH=C:\Users\(my name)\AppData\Local\Programs\Python\Python38\Scripts;%PATH% – Frank Oct 15 '20 at 06:44
0

I didn't really understand the problem but something like this happend to me when I did it too and reinstalling python and discord.py fixed it. you can download python here: https://www.python.org/downloads/ to reinstall pip type python -m pip install in cmd and to install discord.py just type this in the cmd: pip install discord.py

R4ve100
  • 1
  • 1