Environment
I wanted to download kivy some days ago but I stuck with the same problem there as I am here with PyAudio now. I wanted to do the Audio Recognizer with speech_recognition. But the error says that PyAudio is required as well and its not installed. I tried to installed PyAudio too but I got the same pip install error (below). And I have the same thing when I am trying to download Kivy module too. Could you help me? Thanks.
C:\Windows\system32>pip install PyAudio
Collecting 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: 'd:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\temp\\pip-install-6pli5j0v\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\temp\\pip-install-6pli5j0v\\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:\temp\pip-wheel-bmt3h4eq'
cwd: C:\temp\pip-install-6pli5j0v\pyaudio\
Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
copying src\pyaudio.py -> build\lib.win32-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\python\include -Id:\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
src/_portaudiomodule.c(27): fatal error C1083: 袑覑 谐陇聽覑胁斜锌 庐胁袆邪谢胁屑 写聽漏芦 褳袆芦芯蟹覑颅衼覑: stdio.h: No such file or directory,
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for PyAudio
Running setup.py clean for PyAudio
Failed to build PyAudio
DEPRECATION: Could not build wheels for PyAudio which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
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 sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\temp\\pip-install-6pli5j0v\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\temp\\pip-install-6pli5j0v\\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:\temp\pip-record-vzlk5_on\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\Include\PyAudio'
cwd: C:\temp\pip-install-6pli5j0v\pyaudio\
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
copying src\pyaudio.py -> build\lib.win32-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\python\include -Id:\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
src/_portaudiomodule.c(27): fatal error C1083: 袑覑 谐陇聽覑胁斜锌 庐胁袆邪谢胁屑 写聽漏芦 褳袆芦芯蟹覑颅衼覑: stdio.h: No such file or directory,
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\temp\\pip-install-6pli5j0v\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\temp\\pip-install-6pli5j0v\\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:\temp\pip-record-vzlk5_on\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\Include\PyAudio' Check the logs for full command output.
This looks like an issue with PyAudio. You will have better luck reporting this on their issue tracker; there is little pip can do here.
pip install pipwin
pipwin install pyaudio
_https://stackoverflow.com/questions/51992375/python-package-installation-issues-pyaudio-portaudio_
This helped
This really helped!
pip install pipwin
pipwin install pyaudio
pip install kivy
still an error for me
pls help!!
Anyone stil struggling with this issue
Run your cmd in administrator mode:
pip install pipwin
pipwin install pyaudio
this fixes the issue.
Hello guys, I am making a voice assistant, and I have installed pyaudio from my cmd as an administrator using pipwin, I have even updated my visualstudio.
When I start my code in PyCharm I receive " ModuleNotFoundError: No module named 'pyaudio' " while I have installed it several times and in my cmd, it says that it is installed. When I import it in PyCharm and it wants to install the package there, I install it and it gives me an error "ERROR: Command errored out with exit status 1:" proposing to check if I have the latest version of pip and I do, I have updated everything but it seems that it just does not want to work. Any suggestions?
yes it work for me
pip install pipwin
pipwin install pyaudio
this fixes the issue.
Most helpful comment
_https://stackoverflow.com/questions/51992375/python-package-installation-issues-pyaudio-portaudio_
This helped