gpt4 book ai didi

python - pip安装pyaudio错误cl.exe失败

转载 作者:行者123 更新时间:2023-12-02 11:15:31 25 4
gpt4 key购买 nike

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/

关于python - pip安装pyaudio错误cl.exe失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46511423/

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