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)
Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"
(36 answers)
Error while installing lxml through pip: Microsoft Visual C++ 14.0 is required
(8 answers)
Pip error even Microsoft Visual C++ 14.0 is installed
(4 answers)
How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?
(9 answers)
Closed 1 year ago.
I'm beginner in python. I was trying to convert voice to text with python using speech_recognition module. When I run it it says, "Could not find PyAudio; check installation".
then I tried to install pyaudio with pip install pyaudio. But It gives me this error:
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\PC>pip install PyAudio
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-bku61vwd\\pyaudio_9e10d234344b439ca6717d882961d26a\\setup.py'"'"'; __file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-bku61vwd\\pyaudio_9e10d234344b439ca6717d882961d26a\\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\PC\AppData\Local\Temp\pip-wheel-k8_j_ft0'
cwd: C:\Users\PC\AppData\Local\Temp\pip-install-bku61vwd\pyaudio_9e10d234344b439ca6717d882961d26a\
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\PC\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-bku61vwd\\pyaudio_9e10d234344b439ca6717d882961d26a\\setup.py'"'"'; __file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-bku61vwd\\pyaudio_9e10d234344b439ca6717d882961d26a\\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\PC\AppData\Local\Temp\pip-record-myk3sdkb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\PC\AppData\Local\Programs\Python\Python39\Include\PyAudio'
cwd: C:\Users\PC\AppData\Local\Temp\pip-install-bku61vwd\pyaudio_9e10d234344b439ca6717d882961d26a\
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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\PC\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-bku61vwd\\pyaudio_9e10d234344b439ca6717d882961d26a\\setup.py'"'"'; __file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-bku61vwd\\pyaudio_9e10d234344b439ca6717d882961d26a\\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\PC\AppData\Local\Temp\pip-record-myk3sdkb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\PC\AppData\Local\Programs\Python\Python39\Include\PyAudio' Check the logs for full command output.
My Python version is 3.9.7. How to can I install PyAudio module in My Windows 10??
It says it right in the 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/
Download the tools from the given link, install them then try pip install pyaudio again.
Related
Failed to get both dependency injector and pyduktape in Django project requirements.txt. It asked to install Visual C++ 14.0 or greater but it is already there.
requirements.txt containts dependency-injector==3.15.6 and pyduktape==0.0.6
Tried with Python 3.7, pip 21.3.1, and pipenv version 2021.5.29
Building wheels for collected packages: dependency-injector, pyduktape
Building wheel for dependency-injector (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\yasiru\appdata\local\programs\python\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yasi
ru\\AppData\\Local\\Temp\\pip-install-ai16fcys\\dependency-injector_e905913ba3f247b096ecaaf379d20b5b\\setup.py'"'"'; __file__='"'"'C:\\Users\\yasiru\\AppData\\Loca
l\\Temp\\pip-install-ai16fcys\\dependency-injector_e905913ba3f247b096ecaaf379d20b5b\\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(co
de, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\yasiru\AppData\Local\Temp\pip-wheel-23n96w5t'
cwd: C:\Users\yasiru\AppData\Local\Temp\pip-install-ai16fcys\dependency-injector_e905913ba3f247b096ecaaf379d20b5b\
Complete output (13 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\dependency_injector
copying src\dependency_injector\errors.py -> build\lib.win-amd64-3.7\dependency_injector
copying src\dependency_injector\__init__.py -> build\lib.win-amd64-3.7\dependency_injector
copying src\dependency_injector\containers.pxd -> build\lib.win-amd64-3.7\dependency_injector
copying src\dependency_injector\providers.pxd -> build\lib.win-amd64-3.7\dependency_injector
running build_ext
building 'dependency_injector.containers' 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/][1]
----------------------------------------
ERROR: Failed building wheel for dependency-injector
Running setup.py clean for dependency-injector
Building wheel for pyduktape (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\yasiru\appdata\local\programs\python\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yasi
ru\\AppData\\Local\\Temp\\pip-install-ai16fcys\\pyduktape_d628ca64f5d1498c83b77edf959e9080\\setup.py'"'"'; __file__='"'"'C:\\Users\\yasiru\\AppData\\Local\\Temp\\p
ip-install-ai16fcys\\pyduktape_d628ca64f5d1498c83b77edf959e9080\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) el
se io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'e
xec'"'"'))' bdist_wheel -d 'C:\Users\yasiru\AppData\Local\Temp\pip-wheel-gvd80r9x'
cwd: C:\Users\yasiru\AppData\Local\Temp\pip-install-ai16fcys\pyduktape_d628ca64f5d1498c83b77edf959e9080\
Complete output (10 lines):
c:\users\yasiru\appdata\local\programs\python\python37\lib\site-packages\setuptools\installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprec
ated. Requirements should be satisfied by a PEP 517 installer.
SetuptoolsDeprecationWarning,
running bdist_wheel
running build
running build_ext
cythoning pyduktape.pyx to pyduktape.c
c:\users\yasiru\appdata\local\temp\pip-install-ai16fcys\pyduktape_d628ca64f5d1498c83b77edf959e9080\.eggs\cython-0.29.25-py3.7.egg\Cython\Compiler\Main.py:369: Fu
tureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\yasiru\AppData\Local\Temp\pip-in
stall-ai16fcys\pyduktape_d628ca64f5d1498c83b77edf959e9080\pyduktape.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pyduktape' 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 pyduktape
Running setup.py clean for pyduktape
Failed to build dependency-injector pyduktape
Installing collected packages: pyduktape, dependency-injector
Running setup.py install for pyduktape ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\yasiru\appdata\local\programs\python\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ya
siru\\AppData\\Local\\Temp\\pip-install-ai16fcys\\pyduktape_d628ca64f5d1498c83b77edf959e9080\\setup.py'"'"'; __file__='"'"'C:\\Users\\yasiru\\AppData\\Local\\Temp\
\pip-install-ai16fcys\\pyduktape_d628ca64f5d1498c83b77edf959e9080\\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\yasiru\AppData\Local\Temp\pip-record-wgnhusiv\install-record.txt' --single-version-externally-managed --compile --install-
headers 'c:\users\yasiru\appdata\local\programs\python\python37\Include\pyduktape'
cwd: C:\Users\yasiru\AppData\Local\Temp\pip-install-ai16fcys\pyduktape_d628ca64f5d1498c83b77edf959e9080\
Complete output (10 lines):
c:\users\yasiru\appdata\local\programs\python\python37\lib\site-packages\setuptools\installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is depr
ecated. Requirements should be satisfied by a PEP 517 installer.
SetuptoolsDeprecationWarning,
running install
c:\users\yasiru\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is de
precated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_ext
skipping 'pyduktape.c' Cython extension (up-to-date)
building 'pyduktape' 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\yasiru\appdata\local\programs\python\python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\\Users\\yasiru\\AppData\\Local\\Temp\\pip-install-ai16fcys\\pyduktape_d628ca64f5d1498c83b77edf959e9080\\setup.py'"'"'; __file__='"'"'C:\\Use
rs\\yasiru\\AppData\\Local\\Temp\\pip-install-ai16fcys\\pyduktape_d628ca64f5d1498c83b77edf959e9080\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__fil
e__) 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\yasiru\AppData\Local\Temp\pip-record-wgnhusiv\install-record.txt' --single-version-extern
ally-managed --compile --install-headers 'c:\users\yasiru\appdata\local\programs\python\python37\Include\pyduktape' Check the logs for full command output.'''
[1]: https://visualstudio.microsoft.com/visual-cpp-build-tools/
This question already has an answer here:
I can't install pyaudio on Windows 11? [duplicate]
(1 answer)
Closed 1 year ago.
I am attempting to make my own alexa and everytime I try to install pyaudio via the PyCharm terminal it comes up with this huge error:
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\rajan\PycharmProjects\jarvisv2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rajan\\AppData\\Lo
cal\\Temp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"'; __file__='"'"'C:\\Users\\rajan\\AppData\\Local\\Temp\\pip-install-88sq5u2t\\pyaudio_2
3e33d64381a4b7aa4337aa861032198\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import s
etup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\rajan\AppData\Local
\Temp\pip-wheel-hc4a9xm0'
cwd: C:\Users\rajan\AppData\Local\Temp\pip-install-88sq5u2t\pyaudio_23e33d64381a4b7aa4337aa861032198\
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\rajan\PycharmProjects\jarvisv2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rajan\\AppData\\
Local\\Temp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"'; __file__='"'"'C:\\Users\\rajan\\AppData\\Local\\Temp\\pip-install-88sq5u2t\\pyaudio
_23e33d64381a4b7aa4337aa861032198\\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\rajan\AppData\L
ocal\Temp\pip-record-n4u5ra3r\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\rajan\PycharmProjects\jarvisv2\venv\include\site\py
thon3.9\pyaudio'
cwd: C:\Users\rajan\AppData\Local\Temp\pip-install-88sq5u2t\pyaudio_23e33d64381a4b7aa4337aa861032198\
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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\rajan\PycharmProjects\jarvisv2\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\\Users\\rajan\\AppData\\Local\\Temp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"'; __file__='"'"'C:\\Users\\rajan\\AppData\\Local\\Te
mp\\pip-install-88sq5u2t\\pyaudio_23e33d64381a4b7aa4337aa861032198\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.Str
ingIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install -
-record 'C:\Users\rajan\AppData\Local\Temp\pip-record-n4u5ra3r\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\rajan\PycharmProje
cts\jarvisv2\venv\include\site\python3.9\pyaudio' Check the logs for full command output.
WARNING: You are using pip version 21.1.2; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\*****\PycharmProjects\jarvisv2\venv\Scripts\python.exe -m pip install --upgrade pip' command.
How to solve this?
You need to install Microsoft Visual C++ 14.0 or greater.
Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Just download and install those build tools, then try again.
When installing certain packages, certain MS tools are required to build them.
I've been trying to install pyaudio module for speech recognition through a microphone but i couldn't and i have no idea what this error says to me. I'd be very happy if someone helps me
here is the error code (it is the same error without a virtual environment btw, i am using visual studio code):
.
(venv) PS C:\Users\user\Desktop\Coding\Python\speech> 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\desktop\coding\python\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\user\AppData\Local\Temp\pip-install-h3_xztlm\pyaudio_ed19c843927e4d4a9d6303dc8a6e860a\setup.py'"'"'; file='"'"'C:\Users\user\AppData\Local\Temp\pip-install-h3_xztlm\pyaudio_ed19c843927e4d4a9d6303dc8a6e860a\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-5sg_cu_f\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\desktop\coding\python\venv\include\site\python3.9\pyaudio'
cwd: C:\Users\user\AppData\Local\Temp\pip-install-h3_xztlm\pyaudio_ed19c843927e4d4a9d6303dc8a6e860a
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\desktop\coding\python\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\user\AppData\Local\Temp\pip-install-h3_xztlm\pyaudio_ed19c843927e4d4a9d6303dc8a6e860a\setup.py'"'"'; file='"'"'C:\Users\user\AppData\Local\Temp\pip-install-h3_xztlm\pyaudio_ed19c843927e4d4a9d6303dc8a6e860a\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-5sg_cu_f\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\desktop\coding\python\venv\include\site\python3.9\pyaudio' Check the logs for full command output.
I have installed the Visual Studio C++
Nothing changed.
Thx.
Trying to download PyAudio by pip install PyAudio but this isn't working. I'm using Python 3.9.5
also tried python -m pip install pyaudio but it didn't work. Anyone having the same error??
help me solve this error please...
see the code below for reference ↓
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\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\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\keepa\AppData\Local\Temp\pip-wheel-trp3euxd'
cwd: C:\Users\keepa\AppData\Local\Temp\pip-install-e979x4nc\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\
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\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\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\keepa\AppData\Local\Temp\pip-record-isa75oeg\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\keepa\appdata\local\programs\python\python39\Include\PyAudio'
cwd: C:\Users\keepa\AppData\Local\Temp\pip-install-e979x4nc\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\
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/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\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\keepa\AppData\Local\Temp\pip-record-isa75oeg\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\keepa\appdata\local\programs\python\python39\Include\PyAudio' Check the logs for full command output.
When running python 3.6 this works, but with python 3.7 it doesn't.
PyAudio only supports up to python 3.6:
pip will fetch and install PyAudio wheels (prepackaged binaries). Currently, there are wheels compatible with the official distributions of Python 2.7, 3.4, 3.5, and 3.6.
The workarounds would be to use a supported version of python, or to build and install manually - if the latter, you'll need to make sure you have the correct libraries installed and configured.
I should point out that PyAudio appears to be deprecated. It hasn't received an update since March 2017. Therefore I recommend you find another package for this.
Same problem due to the absence of Microsoft compiler that i didn't want to install on my PC.
I used this website unofficial pre-compiled pyaudio wheel packages, it worked well. So download wheel files at this site:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
Of course, download the wheel version that is compatible with your python version.
use the command:
pip install wheel_file_downloaded
pip install pipwin
python -m pipwin install pyaudio
This question already has answers here:
Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools [duplicate]
(4 answers)
Closed 1 year ago.
So I am trying to use pip install bitarray but that results in a error, even I can't really understand. I have had this issue a while already with few other packages, today I installed a virtual environment and I tried to code again. I tried to install the package outside of this venv but I get the same error.
Collecting bitarray
Using cached bitarray-2.1.0.tar.gz (71 kB)
Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed.
Installing collected packages: bitarray
Running setup.py install for bitarray ... error
ERROR: Command errored out with exit status 1:
command: 'd:\workspace\work_env\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\desup\\Acal\\Temp\\pip-install-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"'; __file__='"'"'C:\\Users\\desup\\AppData\\Local\\Temp\ll-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__se io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(cod_, '"'"'exec'"'"'))' install --record 'C:\Users\desup\AppData\Local\Temp\pip-record-c9vvo7_u\install-record.txt' --single-version-externally-manpile --install-headers 'd:\workspace\work_env\include\site\python3.9\bitarray'
cwd: C:\Users\desup\AppData\Local\Temp\pip-install-zbskwcko\bitarray_19f857dc240346679ec2269bbe2d36b2\
Complete output (16 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\bitarray
copying bitarray\test_bitarray.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\test_util.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\__init__.py -> build\lib.win-amd64-3.9\bitarray
copying bitarray\bitarray.h -> build\lib.win-amd64-3.9\bitarray
copying bitarray\pythoncapi_compat.h -> build\lib.win-amd64-3.9\bitarray
copying bitarray\test_data.pickle -> build\lib.win-amd64-3.9\bitarray
running build_ext
building 'bitarray._bitarray' 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: 'd:\workspace\work_env\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\desup\\AppData\\Local\\Temp\\pip-install-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\setup.py'"'"'; __file__='"'"'C:\\Users\\desup\\AppData\\Local\\Temp\\pip-install-zbskwcko\\bitarray_19f857dc240346679ec2269bbe2d36b2\\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\desup\AppData\Local\Temp\pip-record-c9vvo7_u\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\workspace\work_env\include\site\python3.9\bitarray' Check the logs for full command output.```
This part
Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for
Visual Studio": https://visualstudio.microsoft.com/downloads/
suggest that you should install Microsoft Visual C++ 14.0 before installing bitarray. bitarray's PyPI page hints that you need working C compiler before installing bitarray.