【问题标题】:pyaudio give me an error everytime I try to install [duplicate]pyaudio 每次我尝试安装时都会给我一个错误[重复]
【发布时间】:2019-05-03 03:30:38
【问题描述】:

使用 python 安装 pyaudio 时出现此错误,有谁知道这是什么问题或以前遇到过此问题?

C:\Users\BeanieGod>python -m pip install pyaudio
Collecting pyaudio
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
  Running setup.py install for pyaudio ... error
    ERROR: Complete output from command 'C:\Users\BeanieGod\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\BEANIE~1\\AppData\\Local\\Temp\\pip-install-bjzqgxub\\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\BEANIE~1\AppData\Local\Temp\pip-record-t5y6dz6q\install-record.txt' --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    copying src\pyaudio.py -> build\lib.win-amd64-3.7
    running build_ext
    building '_portaudio' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\Users\BeanieGod\AppData\Local\Programs\Python\Python37\include -IC:\Users\BeanieGod\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    src/_portaudiomodule.c(27): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command "'C:\Users\BeanieGod\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\BEANIE~1\\AppData\\Local\\Temp\\pip-install-bjzqgxub\\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\BEANIE~1\AppData\Local\Temp\pip-record-t5y6dz6q\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\BEANIE~1\AppData\Local\Temp\pip-install-bjzqgxub\pyaudio\

【问题讨论】:

标签: python pip pyaudio


【解决方案1】:

尝试从https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio 下载.whl(注意选择正确的版本——PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl?)并运行:

pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-26
    • 1970-01-01
    • 2021-10-17
    • 2014-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多