-1

hello i am trying to install the modul PyAudio and when i am using pip install pyaudo it respond

pip install pyaudio
Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
  Building wheel for pyaudio (setup.py): started
  Building wheel for pyaudio (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\hugol\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\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\hugol\AppData\Local\Temp\pip-wheel-o1wkrc23'
       cwd: C:\Users\hugol\AppData\Local\Temp\pip-install-jkmuij1i\pyaudio\
  Complete output (9 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.8
  copying src\pyaudio.py -> build\lib.win32-3.8
  running build_ext
  building '_portaudio' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": 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: started
    Running setup.py install for pyaudio: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\hugol\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\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\hugol\AppData\Local\Temp\pip-record-iikxybis\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hugol\appdata\local\programs\python\python38-32\Include\pyaudio'
         cwd: C:\Users\hugol\AppData\Local\Temp\pip-install-jkmuij1i\pyaudio\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.8
    copying src\pyaudio.py -> build\lib.win32-3.8
    running build_ext
    building '_portaudio' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\hugol\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\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\hugol\AppData\Local\Temp\pip-record-iikxybis\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hugol\appdata\local\programs\python\python38-32\Include\pyaudio' Check the logs for full command output.

and i dont know ho to fix this problem

Prateek Dewan
  • 1,587
  • 3
  • 16
  • 29
  • Checkout this answer by @Foad https://stackoverflow.com/questions/52283840/i-cant-install-pyaudio-on-windows-how-to-solve-error-microsoft-visual-c-14 – lorem_bacon May 26 '20 at 14:48
  • https://stackoverflow.com/questions/tagged/pip+pyaudio – phd May 26 '20 at 15:18

1 Answers1

0

First, try to run this as admin on your CMD:

pip install pipwin
pipwin install pyaudio

Second, if the problem doesn't resolve, try to install the setuptools:

pip install --upgrade setuptools

Third, you may have to install Visual C++

Mahrez BenHamad
  • 1,791
  • 1
  • 15
  • 21