简体   繁体   中英

I have PyAudio installed on my windows for sure, but when I try to install into Pycharm I get this message?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM