0

THIS IS NOT CODE - ( I have read everything on google, I have the latest version of pip, python, pycharm, I have Installed Microsoft visual studios C++, pip install pipwin then pipwin install pyaudio - all of these installed well with no errors - it's just my Pycharm that doesn't accept the package for some reason. any ideas?

This is the error message in the Pycharm 'Available Packages'

 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'
  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\joe_h\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\joe_h\\AppData\\Local\\Temp\\pip-install-j2z8zhnm\\pyaudio_4cd919902d73421787fec2034b1272c2\\setup.py'"'"'; __file__='"'"'C:\\Users\\joe_h\\AppData\\Local\\Temp\\pip-install-j2z8zhnm\\pyaudio_4cd919902d73421787fec2034b1272c2\\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\joe_h\AppData\Local\Temp\pip-wheel-7444zi78'
       cwd: C:\Users\joe_h\AppData\Local\Temp\pip-install-j2z8zhnm\pyaudio_4cd919902d73421787fec2034b1272c2\
  Complete output (11 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  copying src\pyaudio.py -> build\lib.win-amd64-3.9
  warning: build_py: byte-compiling is disabled, skipping.
  
  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
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\joe_h\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\joe_h\\AppData\\Local\\Temp\\pip-install-j2z8zhnm\\pyaudio_4cd919902d73421787fec2034b1272c2\\setup.py'"'"'; __file__='"'"'C:\\Users\\joe_h\\AppData\\Local\\Temp\\pip-install-j2z8zhnm\\pyaudio_4cd919902d73421787fec2034b1272c2\\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\joe_h\AppData\Local\Temp\pip-record-4nk7pxtt\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\joe_h\AppData\Roaming\Python\Python39\Include\PyAudio'
         cwd: C:\Users\joe_h\AppData\Local\Temp\pip-install-j2z8zhnm\pyaudio_4cd919902d73421787fec2034b1272c2\
    Complete output (11 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    copying src\pyaudio.py -> build\lib.win-amd64-3.9
    warning: build_py: byte-compiling is disabled, skipping.
    
    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\joe_h\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\joe_h\\AppData\\Local\\Temp\\pip-install-j2z8zhnm\\pyaudio_4cd919902d73421787fec2034b1272c2\\setup.py'"'"'; __file__='"'"'C:\\Users\\joe_h\\AppData\\Local\\Temp\\pip-install-j2z8zhnm\\pyaudio_4cd919902d73421787fec2034b1272c2\\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\joe_h\AppData\Local\Temp\pip-record-4nk7pxtt\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\joe_h\AppData\Roaming\Python\Python39\Include\PyAudio' Check the logs for full command output.
0myjoe
  • 43
  • 5
  • Does this answer your question? [Pip error: Microsoft Visual C++ 14.0 is required](https://stackoverflow.com/questions/44951456/pip-error-microsoft-visual-c-14-0-is-required) – Random Davis Jan 14 '21 at 19:07
  • pyaudio relies on portaudio, which is a C++ library – idontknow Jan 14 '21 at 19:26
  • Like I've mentioned above, I have already tried this and have MV C++ 14.0 already. Still doesn't work – 0myjoe Jan 20 '21 at 11:06

1 Answers1

0

PyAudio doesn't have wheels (prebuilt packages) for Python 3.7+ on Windows, PyAudio is supported by Python 2.7, 3.4, 3.5, and 3.6

If you have anaconda you can run conda install pyaudio instead and that should work.

Adam
  • 150
  • 2
  • 12
  • You ran `conda install pyaudio` and that did not work? I tested this out with the `pip` command, I received the same error, everything is resolved with `conda install pyaudio`.. – Adam Jan 21 '21 at 08:59
  • The error is clearly stated in the log, you're running Python 3.9, there aren't any prebuilt packages for Python 3.7+ for Windows, `ctrl + alt + s` and adjust your Python interpreter to either a version that is below 3.9 or point to your Anaconda library. – Adam Jan 21 '21 at 09:12