Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to install pyaudio
#1
I tried to install pyaudio for my python project but it won't work once for the dozen of time I tried installing. Is this a problem with the visual studio that I am using?

|||||||||||||||||||||||||||| vvv (Error Code here) vvv ||||||||||||||||||||||||||||||||||||||||

C:\WINDOWS\system32>pip install --upgrade pyaudio
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/....11.tar.gz
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
ERROR: Complete output from command 'd:\program files\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\wongj\\AppData\\Local\\Temp\\pip-install-xo5y3yxn\\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\wongj\AppData\Local\Temp\pip-wheel-qlvuxo7j' --python-tag cp37:
ERROR: running bdist_wheel
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\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DMS_WIN64=1 "-Id:\program files\python37\include" "-Id:\program files\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-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
d:\program files\python37\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\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\cl.exe' failed with exit status 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: Complete output from command 'd:\program files\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\wongj\\AppData\\Local\\Temp\\pip-install-xo5y3yxn\\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\wongj\AppData\Local\Temp\pip-record-0cybwdpi\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\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DMS_WIN64=1 "-Id:\program files\python37\include" "-Id:\program files\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-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
d:\program files\python37\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\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'d:\program files\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\wongj\\AppData\\Local\\Temp\\pip-install-xo5y3yxn\\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\wongj\AppData\Local\Temp\pip-record-0cybwdpi\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\wongj\AppData\Local\Temp\pip-install-xo5y3yxn\pyaudio\
Reply
#2
Use wheel here.
Eg for you.
pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
Reply
#3
I did try the https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio, unfortunately it didn't work for me. I'm hoping someone can somehow help me do this.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pyaudio seems to randomly halt input. elpidiovaldez5 2 362 Jan-22-2024, 09:07 AM
Last Post: elpidiovaldez5
  Not getting response from pyaudio OceansBlue 1 2,645 Jul-03-2021, 06:22 AM
Last Post: OceansBlue
  Unable to install Python branty1970 5 7,821 May-25-2021, 01:18 PM
Last Post: branty1970
  help with PyAudio Leo12143 1 1,937 Jan-18-2021, 09:56 AM
Last Post: DT2000
  pyAudio playing variable Talking2442 3 3,026 Dec-01-2020, 06:20 PM
Last Post: Talking2442
  Unable to install module rrowhe4d 1 2,283 Oct-13-2020, 10:20 AM
Last Post: Larz60+
  Pyaudio Souls99 7 3,556 Oct-05-2020, 04:06 PM
Last Post: Larz60+
  PyAudio [Errorno -9999] Unanticipated Host Error iMuny 5 5,641 Sep-21-2020, 06:58 PM
Last Post: jefsummers
  PyAudio Buffer Data Calculation MclarenF1 0 2,128 Aug-21-2020, 10:55 AM
Last Post: MclarenF1
  PyAudio throwing Input overflowed anthares 3 4,762 Jun-14-2020, 03:37 PM
Last Post: anthares

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020