我正在使用python 3.9,我可以';我不知道如何在我的Windows 10中安装pyaudio
当前正在使用Visual Studio代码 尝试使用pip安装pyaudio,但它只给出了如下错误:我正在使用python 3.9,我可以';我不知道如何在我的Windows 10中安装pyaudio,python,pyaudio,python-3.9,Python,Pyaudio,Python 3.9,当前正在使用Visual Studio代码 尝试使用pip安装pyaudio,但它只给出了如下错误: PS C:\Users\NIKHIL> pip install pyaudio Defaulting to user installation because normal site-packages is not writeable Collecting pyaudio Using cached PyAudio-0.2.11.tar.gz (37 kB) Building whee
PS C:\Users\NIKHIL> pip install pyaudio
Defaulting to user installation because normal site-packages is
not writeable
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:\program files\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\setup.py'"'"'; __file__='"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\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\NIKHIL\AppData\Local\Temp\pip-wheel-cbxwzcr9'
cwd: C:\Users\NIKHIL\AppData\Local\Temp\pip-install-yo0mmwlt\pyaudio_d4ca14ee2a5246debede93cab086f909\
Complete output (9 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
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:\program files\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\setup.py'"'"'; __file__='"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\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\NIKHIL\AppData\Local\Temp\pip-record-u900rrya\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NIKHIL\AppData\Roaming\Python\Python39\Include\pyaudio'
cwd: C:\Users\NIKHIL\AppData\Local\Temp\pip-install-yo0mmwlt\pyaudio_d4ca14ee2a5246debede93cab086f909\
Complete output (9 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
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:\program files\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\setup.py'"'"'; __file__='"'"'C:\\Users\\NIKHIL\\AppData\\Local\\Temp\\pip-install-yo0mmwlt\\pyaudio_d4ca14ee2a5246debede93cab086f909\\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\NIKHIL\AppData\Local\Temp\pip-record-u900rrya\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NIKHIL\AppData\Roaming\Python\Python39\Include\pyaudio' Check the logs for full command
output.
请提出一个解决办法:< P/>
查看错误消息,看起来你需要VisualC++构建工具。 该错误消息中给出的下载链接
如果链接不起作用,您可以在此处下载: 您可以尝试此方法,如果错误仍然存在,请回复此线程如果有帮助,请向上投票强> 查看错误消息,看起来需要Visual C++构建工具。 该错误消息中给出的下载链接 如果链接不起作用,您可以在此处下载: 您可以尝试此方法,如果错误仍然存在,请回复此线程
如果有帮助,请向上投票您也可以尝试使用.whl文件安装它
希望有帮助 您也可以尝试使用.whl文件安装它
希望有帮助 尝试以下命令:
pip安装pipwin
pipwin安装pyaudio
尝试以下命令:
pip安装pipwin
pipwin安装pyaudio
您应该使用python 3.6.9或更低版本您应该使用python 3.6.9或更低版本从StackOverflow问题可能会有所帮助,因为我遇到了同样的问题,这个答案为我解决了问题
首先以管理员身份运行IDE或CMD,然后运行以下操作:
pip install pipwin
pipwin install pyaudio
从StackOverflow的问题可能会有所帮助,因为我有同样的问题,这个答案为我解决了问题
首先以管理员身份运行IDE或CMD,然后运行以下操作:
pip install pipwin
pipwin install pyaudio
“微软Visual C++ 14或更大”的错误信息部分是必需的。“似乎是相关的。”开始微软“Visual C++ 14或更大”的错误信息的一部分。“似乎是相关的。非常感谢!非常感谢你!这并不能回答这个问题。一旦你有足够的钱,你将能够;相反这并不能回答这个问题。一旦你有足够的钱,你将能够;相反-