简体   繁体   中英

i was trying to install Pyaudio but there is some wrong

Collecting Pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy 'setup.py install' for Pyaudio, since package 'wheel' is not installed.
Installing collected packages: Pyaudio
    Running setup.py install for Pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'd:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Kim Thanh\\AppData\\Local\\Temp\\pip-install-7x320gpc\\pyaudio_0f1d6854b46b44e48bdb8c8fecd1f435\\setup.py'"'"'; __file__='"'"'C:\\Users\\Kim Thanh\\AppData\\Local\\Temp\\pip-install-7x320gpc\\pyaudio_0f1d6854b46b44e48bdb8c8fecd1f435\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Kim Thanh\AppData\Local\Temp\pip-record-s2c4vp4b\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\Include\Pyaudio'
         cwd: C:\Users\Kim Thanh\AppData\Local\Temp\pip-install-7x320gpc\pyaudio_0f1d6854b46b44e48bdb8c8fecd1f435\
    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 Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Id:\python\include -Id:\python\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.9\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    d:\python\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\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Kim Thanh\\AppData\\Local\\Temp\\pip-install-7x320gpc\\pyaudio_0f1d6854b46b44e48bdb8c8fecd1f435\\setup.py'"'"'; __file__='"'"'C:\\Users\\Kim Thanh\\AppData\\Local\\Temp\\pip-install-7x320gpc\\pyaudio_0f1d6854b46b44e48bdb8c8fecd1f435\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Kim Thanh\AppData\Local\Temp\pip-record-s2c4vp4b\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\Include\Pyaudio' Check the logs for full command output.

it seems like visual studio error. Try installing it via terminal if it fails then simply download .wheel .tar files of pyaudio , execute them using python & then again try updating pyaudio

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM