Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
215 views
in Technique[技术] by (71.8m points)

python - Installed PyAudio on my computer but cannot use it on projects

I am using Python 3.8. I installed PyAudio using pip install pipwin / pipwin install pyaudio. But when I tried to install it in a project in Pycharm it was showing error. I tried installing PyAudio from the packages section in Pycharm & from the terminal in PyCharm but didnt work, then I installed it in by pipwin. Then, after installing PyAudio, I tried to add that in my project & install PyAudio from the packages section but it is showing me the same error. For better understanding, I'm giving the whole error here -

  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
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:UsersShahadatPycharmProjectserovenvScriptspython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Shahadat\AppData\Local\Temp\pip-install-zl9c2itb\pyaudio_38c1678d82374bd98bd4fc63737b387b\setup.py'"'"'; __file__='"'"'C:\Users\Shahadat\AppData\Local\Temp\pip-install-zl9c2itb\pyaudio_38c1678d82374bd98bd4fc63737b387b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersShahadatAppDataLocalTemppip-record-4pryvnuminstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:UsersShahadatPycharmProjectserovenvincludesitepython3.8PyAudio'
         cwd: C:UsersShahadatAppDataLocalTemppip-install-zl9c2itbpyaudio_38c1678d82374bd98bd4fc63737b387b
    Complete output (17 lines):
    running install
    running build
    running build_py
    creating build
    creating buildlib.win32-3.8
    copying srcpyaudio.py -> buildlib.win32-3.8
    warning: build_py: byte-compiling is disabled, skipping.
    
    running build_ext
    building '_portaudio' extension
    creating buildemp.win32-3.8
    creating buildemp.win32-3.8Release
    creating buildemp.win32-3.8Releasesrc
    C:Program Files (x86)Microsoft Visual Studio 14.0VCBINcl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:UsersShahadatPycharmProjectserovenvinclude -IC:UsersShahadatAppDataLocalProgramsPythonPython38-32include -IC:UsersShahadatAppDataLocalProgramsPythonPython38-32include "-IC:Program Files (x86)Microsoft Visual Studio 14.0VCINCLUDE" "-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt" "-IC:Program Files (x86)Windows Kits8.1includeshared" "-IC:Program Files (x86)Windows Kits8.1includeum" "-IC:Program Files (x86)Windows Kits8.1includewinrt" /Tcsrc/_portaudiomodule.c /Fobuildemp.win32-3.8Releasesrc/_portaudiomodule.obj
    _portaudiomodule.c
    src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:UsersShahadatPycharmProjectserovenvScriptspython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Shahadat\AppData\Local\Temp\pip-install-zl9c2itb\pyaudio_38c1678d82374bd98bd4fc63737b387b\setup.py'"'"'; __file__='"'"'C:\Users\Shahadat\AppData\Local\Temp\pip-install-zl9c2itb\pyaudio_38c1678d82374bd98bd4fc63737b387b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersShahadatAppDataLocalTemppip-record-4pryvnuminstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:UsersShahadatPycharmProjectserovenvincludesitepython3.8PyAudio' Check the logs for full command output. ```


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...