This question already has answers here:
I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?
(17 answers)
Closed 1 year ago.
So, I was looking for some voice recognition project and I need to use the PyAudio lib, but, when installing it in Windows I just receive some erros of installation.
The method of installation that I'm using is:
pip install pyaudio
When I execute the command in cmd the result is:
command: 'c:\users\pedro\virtualenvs\pyjarvis\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\setup.py'"'"'; __file__='"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\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'"'"'))' bdist_wheel -d 'C:\Users\pedro\AppData\Local\Temp\pip-wheel-9omziclx'
cwd: C:\Users\pedro\AppData\Local\Temp\pip-install-tbw4bc33\pyaudio_3d715acd64eb45979bf989d5585f978d\
Complete output (9 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
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
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\pedro\virtualenvs\pyjarvis\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\setup.py'"'"'; __file__='"'"'C:\\Users\\pedro\\AppData\\Local\\Temp\\pip-install-tbw4bc33\\pyaudio_3d715acd64eb45979bf989d5585f978d\\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\pedro\AppData\Local\Temp\pip-record-mzmmtmwh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\pedro\virtualenvs\pyjarvis\include\site\python3.9\PyAudio'
cwd: C:\Users\pedro\AppData\Local\Temp\pip-install-tbw4bc33\pyaudio_3d715acd64eb45979bf989d5585f978d\
Complete output (9 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
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
That's the problem, what should I do?
Though the error says error: Microsoft Visual C++ 14.0 or greater is required. You can try installing the unofficial python binary for pyaudio from here.
Note - Install the wheel package in accordance of your system and python version.
For example if your system is of 64 bit and you running python 3.9.x then you will have to install PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
After you're done with the installation open up your terminal and navigate to the folder where the wheel package is installed, then enter the following command
pip install your_wheel_package_name.whl
Related
I can access it in the terminal but when I try to add it to my python project in PyCharm it won't let me
I have tried with both python 3.10 and 3.9
it also shows this when i ask for details on why it doesn't work
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (setup.py): started
Building wheel for PyAudio (setup.py): finished with status 'error'
Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
Running setup.py install for PyAudio: started
Running setup.py install for PyAudio: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\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'"'"'))' bdist_wheel -d 'C:\Users\Lenovo\AppData\Local\Temp\pip-wheel-qtpqe2of'
cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-bl692lay\pyaudio_da329c95486d497b95d33a9225fb1595\
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for PyAudio
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\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\Lenovo\AppData\Local\Temp\pip-record-p3n5y632\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\include\site\python3.10\PyAudio'
cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-bl692lay\pyaudio_da329c95486d497b95d33a9225fb1595\
Complete output (11 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-bl692lay\\pyaudio_da329c95486d497b95d33a9225fb1595\\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\Lenovo\AppData\Local\Temp\pip-record-p3n5y632\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\include\site\python3.10\PyAudio' Check the logs for full command output.
WARNING: You are using pip version 21.1.2; however, version 22.0.3 is available.
You should consider upgrading via the 'C:\Users\Lenovo\PycharmProjects\Alexa2\venv\Scripts\python.exe -m pip install --upgrade pip' command.
edit:
now it says:
Command errored out with exit status 1
rather then the warning about c++ visual tools
The error indicates error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/. You should install this to proceed.
I am trying to install spacy version 2.0.0 it starts downloading, but can not install and give this error.
Found existing installation: cymem 2.0.5
Uninstalling cymem-2.0.5:
Successfully uninstalled cymem-2.0.5
Running setup.py install for cymem ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\taqi\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\TAQI\\AppData\\Local\\Temp\\pip-install-o890sm67\\cymem_134557a3656d414d8545e96d491823df\\setup.py'"'"'; __file__='"'"'C:\\Users\\TAQI\\AppData\\Local\\Temp\\pip-install-o890sm67\\cymem_134557a3656d414d8545e96d491823df\\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\TAQI\AppData\Local\Temp\pip-record-oa_pr0r9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\taqi\appdata\local\programs\python\python39\Include\cymem'
cwd: C:\Users\TAQI\AppData\Local\Temp\pip-install-o890sm67\cymem_134557a3656d414d8545e96d491823df\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\cymem
copying cymem\about.py -> build\lib.win-amd64-3.9\cymem
copying cymem\__init__.py -> build\lib.win-amd64-3.9\cymem
package init file 'cymem\tests\__init__.py' not found (or not a regular file)
creating build\lib.win-amd64-3.9\cymem\tests
copying cymem\tests\test_import.py -> build\lib.win-amd64-3.9\cymem\tests
copying cymem\cymem.pyx -> build\lib.win-amd64-3.9\cymem
copying cymem\cymem.pxd -> build\lib.win-amd64-3.9\cymem
copying cymem\__init__.pxd -> build\lib.win-amd64-3.9\cymem
running build_ext
building 'cymem.cymem' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
Rolling back uninstall of cymem
Moving to c:\users\taqi\appdata\local\programs\python\python39\lib\site-packages\cymem-2.0.5.dist-info
from C:\Users\TAQI\AppData\Local\Programs\Python\Python39\Lib\site-packages~ymem-2.0.5.dist-info
Moving to c:\users\taqi\appdata\local\programs\python\python39\lib\site-packages\cymem
from C:\Users\TAQI\AppData\Local\Programs\Python\Python39\Lib\site-packages~ymem
ERROR: Command errored out with exit status 1: 'c:\users\taqi\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\TAQI\AppData\Local\Temp\pip-install-o890sm67\cymem_134557a3656d414d8545e96d491823df\setup.py'"'"'; file='"'"'C:\Users\TAQI\AppData\Local\Temp\pip-install-o890sm67\cymem_134557a3656d414d8545e96d491823df\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\TAQI\AppData\Local\Temp\pip-record-oa_pr0r9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\taqi\appdata\local\programs\python\python39\Include\cymem' Check the logs for full command output.
You're trying to install a version that's fairly old (from 2017) and doesn't have binary wheels for python 3.9 (released in 2020). Actually it doesn't have any binary wheels even for older versions of python, so to install it you'd definitely need a compiler. This is probably not what you want.
If you want spaCy v2 instead of spaCy v3, install like this to get the most recent v2.x release (without having to know the exact version number):
pip install "spacy~=2.0"
This is currently spacy==2.3.7.
Similarly, if you need a specific minor version of v2 like v2.3, you can also use ~= to specify that:
pip install "spacy~=2.3.0"
There are only python 3.9 wheels starting at v2.3.3. Otherwise you'll need to install a compiler as described in the docs: https://spacy.io/usage#source
After doing pip install pyaudio, It started collecting the package but suddenly it displayed Following error
This is the error I got in the terminal
PS C:\Users\user> pip install pyaudio
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: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\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\user\AppData\Local\Temp\pip-record-lmei1_wv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\user\AppData\Local\Temp\pip-install-rqkofe07\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\
Complete output (9 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
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-rqkofe07\\pyaudio_e2694735f99f47ea89c7f6ea2c6b1e31\\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\user\AppData\Local\Temp\pip-record-lmei1_wv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output.
While the solution by #William will work, I think you should do this instead of installing ~4 gb of programs.
Go here, after that, install a suitable wheel
eg:
The suitable wheel for me is PyAudio-0.2.11-cp39-cp39-win_amd64.whl, as I have python 3.9(cp39) and it is a 64 bit installation(amd64).
After installing it in a directory (say, C:/docs), got to cmd and write
cd C:/docs
pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
This should work
extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
The error is in your traceback, you need Microsoft Visual C++.
In order to get C++ on your computer you will need to install Visual Studio using the link in the error code: https://visualstudio.microsoft.com/downloads/
I am trying to install TA-Lib and everything I try does not work. I do not know what package wheel is and why the error references numpy but I am hoping someone can help me.
What I am using:
Python 3.9.2
pip 21.1.1
PS C:\Users\ebben> pip install TA-Lib
Collecting TA-Lib
Using cached TA-Lib-0.4.19.tar.gz (267 kB)
Requirement already satisfied: numpy in c:\python39\lib\site-packages (from TA-Lib) (1.20.2)
Using legacy 'setup.py install' for TA-Lib, since package 'wheel' is not installed.
Installing collected packages: TA-Lib
Running setup.py install for TA-Lib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\setup.py'"'"'; __file__='"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\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\ebben\AppData\Local\Temp\pip-record-z8tx6fp7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\TA-Lib'
cwd: C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\
Complete output (20 lines):
C:\Users\ebben\AppData\Local\Temp\pip-install-kj0oo9o5\ta-lib_40a2fa67a4f04799b16fff76025d88fb\setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\talib
copying talib\abstract.py -> build\lib.win-amd64-3.9\talib
copying talib\deprecated.py -> build\lib.win-amd64-3.9\talib
copying talib\stream.py -> build\lib.win-amd64-3.9\talib
copying talib\test_abstract.py -> build\lib.win-amd64-3.9\talib
copying talib\test_data.py -> build\lib.win-amd64-3.9\talib
copying talib\test_func.py -> build\lib.win-amd64-3.9\talib
copying talib\test_pandas.py -> build\lib.win-amd64-3.9\talib
copying talib\test_stream.py -> build\lib.win-amd64-3.9\talib
copying talib\__init__.py -> build\lib.win-amd64-3.9\talib
running build_ext
building 'talib._ta_lib' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\setup.py'"'"'; __file__='"'"'C:\\Users\\ebben\\AppData\\Local\\Temp\\pip-install-kj0oo9o5\\ta-lib_40a2fa67a4f04799b16fff76025d88fb\\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\ebben\AppData\Local\Temp\pip-record-z8tx6fp7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\TA-Lib' Check the logs for full command output.
TA-Lib is a C-library. You're trying to install a python wrapper for it and it can't find C library during installation. Wrapper prints:
setup.py:71: UserWarning: Cannot find ta-lib library, installation may fail.
So, firstly, install the C library binary, then install python wrapper. Check out Dependencies section at https://mrjbq7.github.io/ta-lib/install.html
This question already has answers here:
Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"
(36 answers)
Closed 3 years ago.
cannot install pyaudio in command prompt.
pip install pyaudio
python -m pip install PyAudio
python pip install python-pyaudio
Collecting PyAudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Nivin\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nivin\\AppData\\Local\\Temp\\pip-install-792muqk4\\PyAudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nivin\\AppData\\Local\\Temp\\pip-install-792muqk4\\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\Nivin\AppData\Local\Temp\pip-record-qs3g__i9\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Nivin\AppData\Local\Temp\pip-install-792muqk4\PyAudio\
Complete output (9 lines):
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
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Nivin\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nivin\\AppData\\Local\\Temp\\pip-install-792muqk4\\PyAudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nivin\\AppData\\Local\\Temp\\pip-install-792muqk4\\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\Nivin\AppData\Local\Temp\pip-record-qs3g__i9\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Installing pyaudio from source requires MSVC Build tools to be installed on the machine so you need to install it first.
Another alternative is to grab a pre-built wheel package from here and install it via pip:
pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl