pyaudio cannot be installed from PyPI - python

I try to install pyaudio with pip in Python 3.8 and the following error raises. In a Conda environment, it can be installed with conda correctly.
C:\Users\csevast>\dev\Python38\python -m 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: 'C:\dev\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\csevast\\AppData\\Local\\Temp\\pip-install-9eju90dy\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\csevast\\AppData\\Local\\Temp\\pip-install-9eju90dy\\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\csevast\AppData\Local\Temp\pip-wheel-9onoc0i8'
cwd: C:\Users\csevast\AppData\Local\Temp\pip-install-9eju90dy\pyaudio\
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\dev\Python38\include -IC:\dev\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\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.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\dev\Python38\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.25.28610\\bin\\HostX86\\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: Command errored out with exit status 1:
command: 'C:\dev\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\csevast\\AppData\\Local\\Temp\\pip-install-9eju90dy\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\csevast\\AppData\\Local\\Temp\\pip-install-9eju90dy\\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\csevast\AppData\Local\Temp\pip-record-dyojsv6s\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\dev\Python38\Include\pyaudio'
cwd: C:\Users\csevast\AppData\Local\Temp\pip-install-9eju90dy\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -IC:\dev\Python38\include -IC:\dev\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\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.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\dev\Python38\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.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\dev\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\csevast\\AppData\\Local\\Temp\\pip-install-9eju90dy\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\csevast\\AppData\\Local\\Temp\\pip-install-9eju90dy\\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\csevast\AppData\Local\Temp\pip-record-dyojsv6s\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\dev\Python38\Include\pyaudio' Check the logs for full command output.

Related

Pip install fails

I'm trying to install a package for python with the following error being given.
Collecting andor
Using cached andor-1.14.tar.gz (237 kB)
Building wheels for collected packages: andor
Building wheel for andor (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\BioPhotonics\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\BioPhotonics\\AppData\\Local\\Temp\\pip-install-xhxcidrk\\andor_d3d6c6374a5f483cb478ca158e6bf226\\setup.py'"'"'; __file__='"'"'C:\\Users\\BioPhotonics\\AppData\\Local\\Temp\\pip-install-xhxcidrk\\andor_d3d6c6374a5f483cb478ca158e6bf226\\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\BioPhotonics\AppData\Local\Temp\pip-wheel-3_wi37w3'
cwd: C:\Users\BioPhotonics\AppData\Local\Temp\pip-install-xhxcidrk\andor_d3d6c6374a5f483cb478ca158e6bf226\
Complete output (13 lines):
running bdist_wheel
running build
running build_ext
skipping 'andor2.c' Cython extension (up-to-date)
building 'andor2' extension
creating build
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -I.. -IC:\Users\BioPhotonics\anaconda3\lib\site-packages\numpy\core\include -I/usr/lib64/python/site-packages/Cython/Includes -IC:\Users\BioPhotonics\anaconda3\include -IC:\Users\BioPhotonics\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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" /Tcandor2.c /Fobuild\temp.win-amd64-3.8\Release\andor2.obj
andor2.c
C:\Users\BioPhotonics\anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
andor2.c(244): fatal error C1083: Cannot open include file: 'atmcdLXd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for andor
Running setup.py clean for andor
Failed to build andor
Installing collected packages: andor
Running setup.py install for andor ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\BioPhotonics\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\BioPhotonics\\AppData\\Local\\Temp\\pip-install-xhxcidrk\\andor_d3d6c6374a5f483cb478ca158e6bf226\\setup.py'"'"'; __file__='"'"'C:\\Users\\BioPhotonics\\AppData\\Local\\Temp\\pip-install-xhxcidrk\\andor_d3d6c6374a5f483cb478ca158e6bf226\\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\BioPhotonics\AppData\Local\Temp\pip-record-fkljfz5y\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\BioPhotonics\anaconda3\Include\andor'
cwd: C:\Users\BioPhotonics\AppData\Local\Temp\pip-install-xhxcidrk\andor_d3d6c6374a5f483cb478ca158e6bf226\
Complete output (13 lines):
running install
running build
running build_ext
skipping 'andor2.c' Cython extension (up-to-date)
building 'andor2' extension
creating build
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -I.. -IC:\Users\BioPhotonics\anaconda3\lib\site-packages\numpy\core\include -I/usr/lib64/python/site-packages/Cython/Includes -IC:\Users\BioPhotonics\anaconda3\include -IC:\Users\BioPhotonics\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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" /Tcandor2.c /Fobuild\temp.win-amd64-3.8\Release\andor2.obj
andor2.c
C:\Users\BioPhotonics\anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
andor2.c(244): fatal error C1083: Cannot open include file: 'atmcdLXd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\BioPhotonics\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\BioPhotonics\\AppData\\Local\\Temp\\pip-install-xhxcidrk\\andor_d3d6c6374a5f483cb478ca158e6bf226\\setup.py'"'"'; __file__='"'"'C:\\Users\\BioPhotonics\\AppData\\Local\\Temp\\pip-install-xhxcidrk\\andor_d3d6c6374a5f483cb478ca158e6bf226\\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\BioPhotonics\AppData\Local\Temp\pip-record-fkljfz5y\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\BioPhotonics\anaconda3\Include\andor' Check the logs for full command output.
(base) C:\Users\BioPhotonics>
It seems to be an issue of the andor package. I've been reading through its files and the setup.py file does not specify a NumPy version. As the latest release of the package is from 2016, I suppose that NumPy's current version is no longer compatible with andor. I suggest you to install an older version of NumPy (perhaps the 1.7) and then try to install andor again.
EDIT: I found the following information in its setup.py file:
The package is for Python 2.7
Its author is Guillaume Lepert (guillaume.lepert07#imperial.ac.uk). Maybe you can contact him so he can give you more information about this package.

When I try to download PyAudio I just got this error message. This is so painful. Pls pleh [duplicate]

This question already has answers here:
PyAudio failed to install on Windows 10
(7 answers)
How to fix installation issues for PyAudio, PortAudio: "fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory"
(10 answers)
Closed 1 year ago.
C:\Users\lansz>pip install 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 Studio\2017\BuildTools\VC\Tools\MSVC\14.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 Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -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\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 Studio\2017\BuildTools\VC\Tools\MSVC\14.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 Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -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\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
I'm watching btw Tech With Tim's tutorial, the "Coronavirus Webscraper" video.
I don’t know what to do with my life and I’ve been suffering with it for 5 hours.
This might help, since it is the same problem you are having:
pyAudio failed to install : Windows 10
Basically you are missing some components you need before download pyaudio, and those are included by pipwin before installing so you don't have to do it yourself.

pyAudio error whilst running python3.8 -m pip install pyAudio. just installed the c++ tools

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2.
command: python3.8 -m pip install pyAudio
Full log:
any help would be greatly appreciated (trying to make a personal assistant like alexa)
Its just installing, so there's no code to be shared.
some of this is because its such a big error i keep getting it looks like your post is mostly code, so please dont mind this.
C:\Users\ryan\OneDrive\Documents\bot\Bots\yt viewer>python3.8 -m 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: 'C:\Users\ryan\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ryan\\AppData\\Local\\Temp\\pip-install-iemnbt3m\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\ryan\\AppData\\Local\\Temp\\pip-install-iemnbt3m\\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\ryan\AppData\Local\Temp\pip-wheel-5l7_9zc6'
cwd: C:\Users\ryan\AppData\Local\Temp\pip-install-iemnbt3m\pyaudio\
Complete output (17 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\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\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\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: Command errored out with exit status 1:
command: 'C:\Users\ryan\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ryan\\AppData\\Local\\Temp\\pip-install-iemnbt3m\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\ryan\\AppData\\Local\\Temp\\pip-install-iemnbt3m\\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\ryan\AppData\Local\Temp\pip-record-ni56xyqn\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\ryan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\pyAudio'
cwd: C:\Users\ryan\AppData\Local\Temp\pip-install-iemnbt3m\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\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\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\ryan\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ryan\\AppData\\Local\\Temp\\pip-install-iemnbt3m\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\ryan\\AppData\\Local\\Temp\\pip-install-iemnbt3m\\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\ryan\AppData\Local\Temp\pip-record-ni56xyqn\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\ryan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\pyAudio' Check the logs for full command output.```

How to fix error while trying to install some dependencies using pip [duplicate]

This question already has answers here:
PyAudio failed to install on Windows 10
(7 answers)
How to fix installation issues for PyAudio, PortAudio: "fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory"
(10 answers)
Closed 2 years ago.
I was just starting out with Mozilla's Deep Speech and tried installing the dependencies for the mic_vad_streaming example when I ran into this error. I was following the steps from the following video that I used for reference - https://www.youtube.com/watch?v=c_0Q3T0XYTA&t=211s .
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\deepspeech\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvw2t7px\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvw2t7px\\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\Admin\AppData\Local\Temp\pip-record-422heum9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\deepspeech\include\site\python3.8\pyaudio'
cwd: C:\Users\Admin\AppData\Local\Temp\pip-install-rvw2t7px\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying src\pyaudio.py -> build\lib.win-amd64-3.8
running build_ext
building '_portaudio' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\admin\deepspeech\include -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\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" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
C:\Python38\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.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\admin\deepspeech\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvw2t7px\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rvw2t7px\\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\Admin\AppData\Local\Temp\pip-record-422heum9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\deepspeech\include\site\python3.8\pyaudio' Check the logs for full command output.
Using pipwin to install pyaudio will solve this
pip install pipwin
then
pipwin install pyaudio

how do I solve error installing a python library?

ERROR: Complete output from command 'c:\users\taha shahid\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\TAHASH~1\\AppData\\Local\\Temp\\pip-install-2qf6m14f\\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\TAHASH~1\AppData\Local\Temp\pip-record-7w0_tqr0\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 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 "-Ic:\users\taha shahid\appdata\local\programs\python\python37\include" "-Ic:\users\taha shahid\appdata\local\programs\python\python37\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" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
_portaudiomodule.c
c:\users\taha shahid\appdata\local\programs\python\python37\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
c:\users\taha shahid\appdata\local\programs\python\python37\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
----------------------------------------
ERROR: Command "'c:\users\taha shahid\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\TAHASH~1\\AppData\\Local\\Temp\\pip-install-2qf6m14f\\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\TAHASH~1\AppData\Local\Temp\pip-record-7w0_tqr0\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\TAHASH~1\AppData\Local\Temp\pip-install-2qf6m14f\Pyaudio\
I have installed record/records. It still gives me this error. Same was the case while installing pycrypto library.

Categories