我具有Windows 10操作系统,正在尝试在python 3.7中安装pyaudio,它给出了错误:
cannot open include file portaudio.h
我也在python 3.4中尝试过,发生了同样的错误。
我已经从portaudio网站下载了一个名为pa-stable -........的文件,但是如何包含它呢?
我尝试将其重命名为portaudio.h,并在尝试安装pyaudio时尝试以cmd状态包含在\ python3.7 / include文件夹中。
但是它显示了portaudio.h中的一些错误
所以我的问题是:
- 如何安装pyaudio,仍然说无法打开包含文件portaudio.h的错误
- 如何编译portaudio
- 如何使用它,如何解决此问题
我没有Mac操作系统,因此无法使用-brew install portaudio
code in image page 1
[图像页2中的代码] [2]
[2]:https://i.stack.imgur.com/pbyQj.png enter code here
- C:\ Windows \ system32> pip安装pyaudio
- 收集pyaudio
- 使用缓存的https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
- 收集的包裹的构建轮:pyaudio
- pyaudio的构建轮(setup.py)...错误
- 错误:命令'c:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ python.exe'-u -c'import setuptools,tokenize; file 的完整输出> ='“'”'C:\ Users \ Manav \ AppData \ Local \ Temp \ pip-install-v0ph2yme \ pyaudio \ setup.py'“'''; f = getattr(tokenize,'”'“'open' “'”',打开)(文件); code = f.read()。replace('“'”'\ r \ n'“'”','“'”'\ n '“'”'); f.close(); exec(compile(code, file ,'“'”'exec'“'”')))'bdist_wheel -d'C:\ Users \ Manav \ AppData \ Local \ Temp \ pip-wheel-fpp3aqag'--python-tag cp37:
- 错误:正在运行bdist_wheel
- 运行构建
- 运行build_py
- 创建版本
- 创建build \ lib.win32-3.7
- 复制src \ pyaudio.py-> build \ lib.win32-3.7
- 运行build_ext
- 构建“ _portaudio”扩展名
- 创建build \ temp.win32-3.7
- 创建build \ temp.win32-3.7 \ Release
- 创建build \ temp.win32-3.7 \ Release \ src
I.C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ bin \ HostX86 \ x86 \ cl.exe / c / nologo / Ox / W3 / GL / DNDEBUG / MD -Ic:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ include -IC:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ include“ -IC:\ Program文件(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ ATLMFC \ include“” -IC:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ include“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ ucrt“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ shared“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ um“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0。 17763.0 \ winrt“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ cppwinrt“ /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.7\Release\src/_portaudiomodule.obj
- _portaudiomodule.c
- src / _portaudiomodule.c(29):致命错误C1083:无法打开包含文件:'portaudio.h':没有此类文件或目录
- 错误:命令'C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ bin \ HostX86 \ x86 \ cl.exe'失败,退出状态为2 < / li>
-
- 错误:pyaudio的构建轮失败
- 运行setup.py clean for pyaudio
- 无法构建pyaudio
- 安装收集的软件包:pyaudio
- 正在运行setup.py安装pyaudio ...错误
- 错误:命令'c:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ python.exe'-u -c'import setuptools,tokenize; file 的完整输出> ='“'”'C:\ Users \ Manav \ AppData \ Local \ Temp \ pip-install-v0ph2yme \ pyaudio \ setup.py'“'''; f = getattr(tokenize,'”'“'open' “'”',打开)(文件); code = f.read()。replace('“'”'\ r \ n'“'”','“'”'\ n '“”“'); f.close(); exec(compile(code, file ,'”'“'exec'”'“')))'安装-记录'C:\ Users \ Manav \ AppData \ Local \ Temp \ pip-record-_247z450 \ install-record.txt'--single-version-externally-managed --compile:
- 错误:正在运行安装
- 运行构建
- 运行build_py
- 创建版本
- 创建build \ lib.win32-3.7
- 复制src \ pyaudio.py-> build \ lib.win32-3.7
- 运行build_ext
- 构建“ _portaudio”扩展名
- 创建build \ temp.win32-3.7
- 创建build \ temp.win32-3.7 \ Release
- 创建build \ temp.win32-3.7 \ Release \ src
- C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ bin \ HostX86 \ x86 \ cl.exe / c / nologo / Ox / W3 / GL / DNDEBUG / MD -Ic:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ include -Ic:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ include“ -IC:\程序文件(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ ATLMFC \ include“” -IC:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ include“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ ucrt“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ shared“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ um“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0 .17763.0 \ winrt“” -IC:\ Program Files(x86)\ Windows Kits \ 10 \ include \ 10.0.17763.0 \ cppwinrt“ /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.7\Release\src/_portaudiomodule。 obj
- _portaudiomodule.c
- src / _portaudiomodule.c(29):致命错误C1083:无法打开包含文件:'portaudio.h':没有此类文件或目录
- 错误:命令'C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ bin \ HostX86 \ x86 \ cl.exe'失败,退出状态为2 < / li>
-
-
错误:命令“'c:\ users \ manav \ appdata \ local \ programs \ python \ python37-32 \ python.exe'-u -c'导入setuptools,标记化; 文件 ='“'”'C:\ Users \ Manav \ AppData \ Local \ Temp \ pip-install-v0ph2yme \ pyaudio \ setup.py'“'';; f = getattr(tokenize,'”'“'open '“'”',打开)(文件); code = f.read()。replace('“'”'\ r \ n'“'”','“'”'\ n'“'”'); f.close(); exec(compile(code, file ,'“'”'exec'“'”'')))'安装-记录'C: \ Users \ Manav \ AppData \ Local \ Temp \ pip-record-_247z450 \ install-record.txt'--single-version-externally-managed --compile“在C:\ Users \ Manav \ AppData中失败,错误代码为1 \ Local \ Temp \ pip-install-v0ph2yme \ pyaudio \
-
C:\ Windows \ system32>