如何安装pyaudio出现portaudio错误

时间:2019-05-17 02:30:19

标签: python-3.4 python-3.7 pyaudio portaudio

我具有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中的一些错误

所以我的问题是:

  1. 如何安装pyaudio,仍然说无法打开包含文件portaudio.h的错误
  2. 如何编译portaudio
  3. 如何使用它,如何解决此问题

我没有Mac操作系统,因此无法使用-brew install portaudio code in image page 1 [图像页2中的代码] [2]

[2]:https://i.stack.imgur.com/pbyQj.png enter code here

  1. C:\ Windows \ system32> pip安装pyaudio
  2. 收集pyaudio
  3. 使用缓存的https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
  4. 收集的包裹的构建轮:pyaudio
  5. pyaudio的构建轮(setup.py)...错误
  6. 错误:命令'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:
  7. 错误:正在运行bdist_wheel
  8. 运行构建
  9. 运行build_py
  10. 创建版本
  11. 创建build \ lib.win32-3.7
  12. 复制src \ pyaudio.py-> build \ lib.win32-3.7
  13. 运行build_ext
  14. 构建“ _portaudio”扩展名
  15. 创建build \ temp.win32-3.7
  16. 创建build \ temp.win32-3.7 \ Release
  17. 创建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
  18. _portaudiomodule.c
  19. src / _portaudiomodule.c(29):致命错误C1083:无法打开包含文件:'portaudio.h':没有此类文件或目录
  20. 错误:命令'C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ bin \ HostX86 \ x86 \ cl.exe'失败,退出状态为2 < / li>

  21. 错误:pyaudio的构建轮失败
  22. 运行setup.py clean for pyaudio
  23. 无法构建pyaudio
  24. 安装收集的软件包:pyaudio
  25. 正在运行setup.py安装pyaudio ...错误
  26. 错误:命令'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:
  27. 错误:正在运行安装
  28. 运行构建
  29. 运行build_py
  30. 创建版本
  31. 创建build \ lib.win32-3.7
  32. 复制src \ pyaudio.py-> build \ lib.win32-3.7
  33. 运行build_ext
  34. 构建“ _portaudio”扩展名
  35. 创建build \ temp.win32-3.7
  36. 创建build \ temp.win32-3.7 \ Release
  37. 创建build \ temp.win32-3.7 \ Release \ src
  38. 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
  39. _portaudiomodule.c
  40. src / _portaudiomodule.c(29):致命错误C1083:无法打开包含文件:'portaudio.h':没有此类文件或目录
  41. 错误:命令'C:\ Program Files(x86)\ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.20.27508 \ bin \ HostX86 \ x86 \ cl.exe'失败,退出状态为2 < / li>

  42. 错误:命令“'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 \

  43. C:\ Windows \ system32>

0 个答案:

没有答案