gpt4 book ai didi

python - 如何修复 PyAudio、PortAudio : "fatal error C1083: Cannot open include file: ' portaudio. h' 的安装问题:没有这样的文件或目录”

转载 作者:太空狗 更新时间:2023-10-30 00:27:15 25 4
gpt4 key购买 nike

我在安装 PyAudio 和 portaudio 时遇到问题。

当我执行 python -m pip install pyaudio 时出现此错误:

    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\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
Command ""C:\Users\This PC\AppData\Local\Programs\Python\Python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\THISPC~1\\AppData\\Local\\Temp\\pip-install-3ock7jqh\\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\THISPC~1\AppData\Local\Temp\pip-record-14pe9p6y\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\THISPC~1\AppData\Local\Temp\pip-install-3ock7jqh\pyaudio\

所以在查找了那个错误之后,我读到我需要安装 portaudio。所以我做了 python -m pip install portaudio 并得到了这个错误:

Collecting portaudio
Could not find a version that satisfies the requirement portaudio (from versions: )
No matching distribution found for portaudio

我现在不知道该去哪里。

最佳答案

试试这个,以管理员身份运行 CMD 并运行以下命令:

pip install pipwin
pipwin install pyaudio

关于python - 如何修复 PyAudio、PortAudio : "fatal error C1083: Cannot open include file: ' portaudio. h' 的安装问题:没有这样的文件或目录”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51992375/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com