当前位置: 首页 > 面试题库 >

pip安装pyaudio错误cl.exe失败

王飞英
2023-03-14
问题内容
C:\Program Files (x86)\Microsoft Visual C++ Build Tools>pip install pyaudio
Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
  Running setup.py install for pyaudio ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\cybercry\\AppData\\Local\\Temp\\pip-build-tder68r3\\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\cybercry\AppData\Local\Temp\pip-0p059g11-record\install-record.txt --single-version-externally-managed --compile:
    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 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\python27\include -Ic:\python27\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    c:\python27\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
    c:\python27\include\pyconfig.h(117): note: command-line arguments:  see previous definition of 'MS_WIN64'
    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 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\cybercry\\AppData\\Local\\Temp\\pip-build-tder68r3\\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\cybercry\AppData\Local\Temp\pip-0p059g11-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\cybercry\AppData\Local\Temp\pip-build-tder68r3\pyaudio\

问题答案:

PyAudio的预制轮子目前可用于Python
2.7和3.4-3.6。如果您不想使用Python
3.6并想在3.7中安装PyAudio,则必须从源代码编译并安装PortAudio和PyAudio。请参阅以下说明

http://portaudio.com/docs/v19-doxydocs/tutorial_start.html

https://smaudet.wordpress.com/2014/01/26/building-pyaudio-on-
windows-7-x64-using-the-free-msvc-
toolchains/



 类似资料:
  • 问题内容: 当我试图安装使用,我得到的错误。看起来像这样: 知道这里发生了什么吗? 问题答案: 尝试以下操作(在管理员模式命令提示符下): pipwin就像pip一样,但是它安装了Christoph Gohlke提供的预编译的Windows二进制文件。为您节省大量的Google搜寻和手动下载。

  • 我刚刚在我的MAC(约塞米蒂)上安装了Python3.4.3。我需要安装几个lxml,但是每次输入:pip install/“”/时,我都会得到错误消息。我已经遵循了多个教程,并且安装了pip。MAC已经有Python2.7.,但我安装了3.4.3。版本,不确定这是否是问题所在。错误消息为: brunos-macbook-pro:~brunopaesleme$pip install/macinto

  • 我在RHEL8版本上使用pip安装包时遇到错误 警告:在连接被“SSLError(SSLErrr(1,”[SSL:TLSV1_ALERT_PROTOCOL_VERSION]TLSV1警报协议版本(_SSL.c:1076)”)”中断后重试(重试(总数=4,连接=无,读取=无,重定向=无,状态=无)):/simple/requests/ 我的python版本是3.7.6,pip版本是19.2.3 我从

  • 问题内容: 我使用Mac(OS X 10.11.5)。我想为python安装模块。在我输入,,。但是会发生错误。 该目录或其父目录不属于当前用户,并且缓存已被禁用。请检查该目录的权限和所有者。如果执行有,你可能想的标志。 该目录或其父目录不属于当前用户,并且缓存轮已被禁用。检查该目录的权限和所有者。如果执行有,你可能想的标志。 问题答案: 在运行pip安装之前,我可以通过Homebrew恢复到较旧

  • 问题内容: 我正在运行Ubuntu 11.04,Python 2.7.1,并想安装Pyaudio。所以我跑了 在终端中,并退出并显示以下错误消息, 我不确定是将其发布在askubuntu.com还是在stackoveflow中发布,但是无论如何,它都在stackoverflow中。另外我用谷歌搜索了一下这个问题,发现通过安装python- dev已经解决了一些问题。我已经安装了python-dev

  • 我正在尝试从PyCharm安装包vprof,但我收到了错误: 收集vprof 使用缓存的https://files . python hosted . org/packages/0b/2b/5b 690 C 8 BD 73231216 C 82180 b 7 b 162 cf 433 DD 98d 6212 b 19 a 7374 C5 cf 09622/tar . gz命令的完整输出python