0
votes

As I am running CMD as administrator and trying to install pyaudio by pip install pyaudio I am getting the folloing error. I also have installed MS-VS C++ 14.

Installing collected packages: pyaudio Running setup.py install for pyaudio ... error ERROR: Command errored out with exit status 1: command: 'c:\users\cloud analogy\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\CLOUDA~1\AppData\Local\Temp\pip-install-dcxzpwri\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\CLOUDA~1\AppData\Local\Temp\pip-install-dcxzpwri\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\CLOUDA~1\AppData\Local\Temp\pip-record-1s6dsj4b\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\CLOUDA~1\AppData\Local\Temp\pip-install-dcxzpwri\pyaudio\ Complete output (9 lines): running install running build running build_py creating build creating build\lib.win32-3.7 copying src\pyaudio.py -> build\lib.win32-3.7 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: Command errored out with exit status 1: 'c:\users\cloud analogy\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\CLOUDA~1\AppData\Local\Temp\pip-install-dcxzpwri\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\CLOUDA~1\AppData\Local\Temp\pip-install-dcxzpwri\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\CLOUDA~1\AppData\Local\Temp\pip-record-1s6dsj4b\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

1
The proposed solution is hidden in the middle of the error message: Go to https://visualstudio.microsoft.com/downloads/, download and install "Microsoft Visual C++ Build Tools". - Sven Krüger
i have already installed the MSVC++14 - Shivang Kumar

1 Answers

1
votes

Since you are on windows, go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and download pyaudio according to the version of python that you have Then navigate to the directory that contains your file and install the module except replacing the module name with the file name

e.g.

pip install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl