我试着用不同的方法安装PyAudio,但是什么都不可能.我每次都看到同样的错误。我看到别人也有同样的问题,我看了他的问题,我看到我们的问题是一样的。但是有人评论说,您可以下载VsCode C++构建工具,,但是还有其他方法可以解决我的问题吗?如果是,请尽快这样做!
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.发布于 2020-10-24 18:26:10
如果您使用的是来自python.org的标准PyAudio发行版,您可以从Christoph的非官方用于Windows的Python扩展包存储库下载一个用于Windows的Python扩展包轮子。下载完后,在命令提示符或Powershell中,转到下载.whl文件的目录,只需输入
pip install name_of_file_you_just_download.whl显然使用了文件的真名。
https://stackoverflow.com/questions/64516624
复制相似问题