[英]how do i install pyaudio on windows ten for python 3.8.5
I downloaded py audio on windows ten but when i run the code it says please build and install the PortAudio Python bindings first.我在 Windows 10 上下载了 py 音频,但是当我运行代码时,它说请先构建并安装 PortAudio Python 绑定。 When i did pip install portAudio or pip install port audio it said:
当我执行 pip install portAudio 或 pip install port audio 时,它说:
ERROR: Command errored out with exit status 1:
command: 'c:\users\stewa\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\stewa\\AppData\\Local\\Temp\\pip-install-0ync7n97\\audio.coders\\setup.py'"'"'; __file__='"'"'C:\\Users\\stewa\\AppData\\Local\\Temp\\pip-install-0ync7n97\\audio.coders\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\stewa\AppData\Local\Temp\pip-pip-egg-info-cg067rmb'
cwd: C:\Users\stewa\AppData\Local\Temp\pip-install-0ync7n97\audio.coders\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\stewa\AppData\Local\Temp\pip-install-0ync7n97\audio.coders\setup.py", line 5, in <module>
import ConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full
command
output.
Does anyone know what i should do?有谁知道我应该怎么做? many thanks
非常感谢
According to the documentation, the python wheels only provide support up to version 3.6 of python.根据文档,python 轮子仅提供最高 3.6 版的 python 支持。 Apparently you're using the latest version, I've tested it on my system (Win10) using python 3.6 using this command:
显然您使用的是最新版本,我已经使用 python 3.6 在我的系统(Win10)上使用以下命令对其进行了测试:
python -m pip install pyaudio
And it works它有效
That probably happened because you got the wrong PyAudio version.这可能是因为你得到了错误的 PyAudio 版本。 You have to get the compatible version with your windows(32 or 64) and with python.
您必须获得与您的 windows(32 或 64)和 python 兼容的版本。 check here
在这里检查
First you have to uninstall PyAudio first using the command pip uninstall pyAudio
首先,您必须先使用命令
pip uninstall pyAudio
Then after you getting the right version you got to the repository and install it.然后,在您获得正确的版本后,您将进入存储库并安装它。
Example: pip install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
示例:
pip install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
These steps solved the issue for me这些步骤为我解决了这个问题
For Windows OS run:对于 Windows 操作系统运行:
pip install pipwin
pipwin install pyaudio
For Linux OS run:对于 Linux 操作系统运行:
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
pip install pyaudio --user
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.