当我尝试下载 PyAudio 时,我收到了这条错误消息。这太痛苦了。请大家
When I try to download PyAudio I just got this error message. This is so painful. Pls pleh
C:\Users\lansz>pip 安装 pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\lansz\AppData\Local\Temp\pip-wheel-661td9fy'
cwd: C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\lansz\appdata\local\programs\python\python39\include -Ic:\users\lansz\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\lansz\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: 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\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\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\lansz\AppData\Local\Temp\pip-record-gaglivtc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lansz\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\lansz\appdata\local\programs\python\python39\include -Ic:\users\lansz\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\lansz\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: 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\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\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\lansz\AppData\Local\Temp\pip-record-gaglivtc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lansz\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\users\lansz\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
=========================================== ===============
:C
我正在观看 Tech With Tim 的教程“Coronavirus Webscraper”视频。
我不知道我的生活该怎么办,我已经忍受了5个小时。
这可能会有所帮助,因为这与您遇到的问题相同:
基本上你在下载 pyaudio 之前缺少一些你需要的组件,而这些组件在安装之前由 pipwin 包含,所以你不必自己做。
C:\Users\lansz>pip 安装 pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\lansz\AppData\Local\Temp\pip-wheel-661td9fy'
cwd: C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\lansz\appdata\local\programs\python\python39\include -Ic:\users\lansz\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\lansz\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: 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\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\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\lansz\AppData\Local\Temp\pip-record-gaglivtc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lansz\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\lansz\appdata\local\programs\python\python39\include -Ic:\users\lansz\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio17\BuildTools\VC\Tools\MSVC.16.27023\include -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\include.0.17763.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\lansz\appdata\local\programs\python\python39\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
src/_portaudiomodule.c: note: 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\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lansz\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\pyaudio\setup.py'"'"'; __file__='"'"'C:\Users\lansz\AppData\Local\Temp\pip-install-ttc_7ppq\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\lansz\AppData\Local\Temp\pip-record-gaglivtc\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lansz\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\users\lansz\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
=========================================== =============== :C 我正在观看 Tech With Tim 的教程“Coronavirus Webscraper”视频。 我不知道我的生活该怎么办,我已经忍受了5个小时。
这可能会有所帮助,因为这与您遇到的问题相同:
基本上你在下载 pyaudio 之前缺少一些你需要的组件,而这些组件在安装之前由 pipwin 包含,所以你不必自己做。