简体   繁体   中英

Error While Installing Pyaudio in windows 10

Collecting pyaudio Using cached PyAudio-0.2.11.tar.gz (37 kB) Building wheels for collected packages: pyaudio Building wheel for pyaudio (setup.py)... error ERROR: Command errored out with exit status 1: command: 'c:\users\username\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\setup.py'"'"'; file ='"'"'C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file , '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\username\AppData\Local\Temp\pip-wheel-667y35fv' cwd: C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\ Complete output (9 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.8 copying src\pyaudio.py -> build\lib.win-amd64-3.8 running build_ext building '_portaudio' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/


ERROR: Failed building wheel for pyaudio Running setup.py clean for pyaudio Failed to build pyaudio Installing collected packages: pyaudio Running setup.py install for pyaudio... error ERROR: Command errored out with exit status 1: command: 'c:\users\username\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\setup.py'"'"'; file ='"'"'C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file , '"'"'exec'"'"'))' install --record 'C:\Users\username\AppData\Local\Temp\pip-record-tl9zjqrp\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\username\appdata\local\programs\python\python38\Include\pyaudio' cwd: C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\ Complete output (9 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.8 copying src\pyaudio.py -> build\lib.win-amd64-3.8 running build_ext building '_portaudio' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

I think you should install Microsoft Visual C++ 14.0 in this site https://visualstudio.microsoft.com/downloads/

 C:\Users\username\AppData\Local\Temp\pip-install-vo4omqnb\pyaudio\
 Complete output (9 lines): running bdist_wheel running build running
 build_py creating build creating build\lib.win-amd64-3.8 copying
 src\pyaudio.py -> build\lib.win-amd64-3.8 running build_ext building
 '_portaudio' extension error: Microsoft Visual C++ 14.0 is required.
 Get it with "Microsoft Visual C++ Build Tools":
 https://visualstudio.microsoft.com/downloads/

these error messages indicate you to install Microsoft Visual C++ 14.0

Once try these commands in your prompt

pip install pipwin

pipwin install pyaudio

pipwin automatically installs required wheel for it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM