0

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.

Kevin Métivier
  • 68
  • 2
  • 10
  • 1
    The proposed solution is hidden in the middle of the error message: Go to [https://visualstudio.microsoft.com/downloads/](https://visualstudio.microsoft.com/downloads/), download and install "Microsoft Visual C++ Build Tools". – Sven-Eric Krüger Dec 02 '19 at 15:59
  • i have already installed the MSVC++14 – Shivang Kumar Dec 04 '19 at 06:49
  • Does this answer your question? [PyAudio error at the time of intallation (subprocess-exited-with-error)](https://stackoverflow.com/questions/71072094/pyaudio-error-at-the-time-of-intallation-subprocess-exited-with-error) – Alireza Abdi Jul 17 '22 at 00:26

1 Answers1

1

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

Sean Lim
  • 11
  • 3