0

I tried different ways to install PyAudio but nothing was possible... I saw the same Error everytime. I saw someone else also had the same problem I read his question, I saw that everything was same in our question. But someone commented that you can download VsCode C++ Build Tools, but does anyone has any other way to solve my issue? If yes please do that as soon as possible!!!

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\som\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Som\\AppData\\Local\\Temp\\pip-install-im6cqmmw\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Som\\AppData\\Local\\Temp\\pip-install-im6cqmmw\\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\Som\AppData\Local\Temp\pip-wheel-gtvpy8y6'
       cwd: C:\Users\Som\AppData\Local\Temp\pip-install-im6cqmmw\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 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  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\som\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Som\\AppData\\Local\\Temp\\pip-install-im6cqmmw\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Som\\AppData\\Local\\Temp\\pip-install-im6cqmmw\\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\Som\AppData\Local\Temp\pip-record-d6mu781h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\som\appdata\local\programs\python\python38\Include\pyaudio'
         cwd: C:\Users\Som\AppData\Local\Temp\pip-install-im6cqmmw\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 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\som\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Som\\AppData\\Local\\Temp\\pip-install-im6cqmmw\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Som\\AppData\\Local\\Temp\\pip-install-im6cqmmw\\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\Som\AppData\Local\Temp\pip-record-d6mu781h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\som\appdata\local\programs\python\python38\Include\pyaudio' Check the logs for full command output.

1 Answers1

0

If you are using the standard Python distribution from python.org, you can download a PyAudio wheel from Christoph Gohlke's unofficial Python Extension Packages for Windows repository. Once downloaded, in the command prompt or Powershell, go to the directory where you downloaded the .whl file and simply enter

pip install name_of_file_you_just_download.whl

obviously using the real name of the file.

MattDMo
  • 100,794
  • 21
  • 241
  • 231