Unable to install PyAudio on windows 10 - python

I have tried installing pyaudio on Windows 10 but I am getting the following errors:
pip install python-pyaudio
Collecting python-pyaudio
ERROR: Could not find a version that satisfies the requirement python-pyaudio (from versions: none)
ERROR: No matching distribution found for python-pyaudio
C:\Users\lenovo>pip install 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:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\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\lenovo\AppData\Local\Temp\pip-record-26rv078i\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\lenovo\AppData\Local\Temp\pip-install-d7mfqufu\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": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-d7mfqufu\\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\lenovo\AppData\Local\Temp\pip-record-26rv078i\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
Any suggestions on what to try to fix this?

You need to install Microsoft Visual c++ 14.0, you can get it here: http://landinghub.visualstudio.com/visual-cpp-build-tools

Related

when i install pip install pyaudio its getting error [duplicate]

This question already has answers here:
Pip error: Microsoft Visual C++ 14.0 is required
(13 answers)
Closed 2 years ago.
C:\Users\ABC>pip install pyaudio
Collecting pyaudio
Downloading 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\abc\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ABC\\AppData\\Local\\Temp\\pip-install-_y3fknpl\\pyaudio_cfd10ebeac564e77949993d585b75b18\\setup.py'"'"'; __file__='"'"'C:\\Users\\ABC\\AppData\\Local\\Temp\\pip-install-_y3fknpl\\pyaudio_cfd10ebeac564e77949993d585b75b18\\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\ABC\AppData\Local\Temp\pip-record-ue5ei1nt\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\abc\appdata\local\programs\python\python39\Include\pyaudio'
cwd: C:\Users\ABC\AppData\Local\Temp\pip-install-_y3fknpl\pyaudio_cfd10ebeac564e77949993d585b75b18\
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\abc\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ABC\\AppData\\Local\\Temp\\pip-install-_y3fknpl\\pyaudio_cfd10ebeac564e77949993d585b75b18\\setup.py'"'"'; __file__='"'"'C:\\Users\\ABC\\AppData\\Local\\Temp\\pip-install-_y3fknpl\\pyaudio_cfd10ebeac564e77949993d585b75b18\\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\ABC\AppData\Local\Temp\pip-record-ue5ei1nt\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\abc\appdata\local\programs\python\python39\Include\pyaudio' Check the logs for full command output
It's telling you, in the error message, Microsoft Visual C++ 14.0 is required. You should install it. You haven't indicated that you have or haven't installed it, so if you have, you should specify that that's your issue. It seems like the issue is that you just didn't read the error message though.

ERROR: Command errored out with exit status [duplicate]

This question already has answers here:
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.
hello i am trying to install the modul PyAudio and when i am using
pip install pyaudo it respond
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): started
Building wheel for pyaudio (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\hugol\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\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\hugol\AppData\Local\Temp\pip-wheel-o1wkrc23'
cwd: C:\Users\hugol\AppData\Local\Temp\pip-install-jkmuij1i\pyaudio\
Complete output (9 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
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
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: started
Running setup.py install for pyaudio: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\hugol\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\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\hugol\AppData\Local\Temp\pip-record-iikxybis\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hugol\appdata\local\programs\python\python38-32\Include\pyaudio'
cwd: C:\Users\hugol\AppData\Local\Temp\pip-install-jkmuij1i\pyaudio\
Complete output (9 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
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\hugol\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\hugol\\AppData\\Local\\Temp\\pip-install-jkmuij1i\\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\hugol\AppData\Local\Temp\pip-record-iikxybis\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hugol\appdata\local\programs\python\python38-32\Include\pyaudio' Check the logs for full command output.
and i dont know ho to fix this problem
First, try to run this as admin on your CMD:
pip install pipwin
pipwin install pyaudio
Second, if the problem doesn't resolve, try to install the setuptools:
pip install --upgrade setuptools
Third, you may have to install Visual C++

got an error while installing pyodbc in virtual enviornment

I have created a virtual environment for flask development.now, I want to install pyodbc to connect with sql server. I tried to install with pip install pyodbc in my virtual environment. I got following error-
Collecting pyodbc
Using cached https://files.pythonhosted.org/packages/75/29/aa190749bac37ede0f11a68a75e7055254699c11572bd94213f1163dfd8f/pyodbc-4.0.27.tar.gz
Building wheels for collected packages: pyodbc
Building wheel for pyodbc (setup.py) ... error
>ERROR: Command errored out with exit status 1:
command: 'C:\Users\bitre\Anaconda3\envs\flaskEnv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\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\bitre\AppData\Local\Temp\pip-wheel-49fya41s' --python-tag cp38
cwd: C:\Users\bitre\AppData\Local\Temp\pip-install-313n7fr3\pyodbc\
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
>ERROR: Failed building wheel for pyodbc
Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc
Running setup.py install for pyodbc ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\bitre\Anaconda3\envs\flaskEnv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\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\bitre\AppData\Local\Temp\pip-record-645ww_jo\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\bitre\AppData\Local\Temp\pip-install-313n7fr3\pyodbc\
Complete output (5 lines):
running install
running build
running build_ext
building 'pyodbc' 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\bitre\Anaconda3\envs\flaskEnv\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\bitre\\AppData\\Local\\Temp\\pip-install-313n7fr3\\pyodbc\\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\bitre\AppData\Local\Temp\pip-record-645ww_jo\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I tried outside virtual Environment,
Requirement already satisfied: pyodbc in c:\users\bitre\anaconda3\lib\site-packages (4.0.26)
You can try installing using this command if anaconda as a base in virtual environment-:
conda install -c anaconda pyodbc

CMD is not installing my packages using pip

Having errors on cmd as admin trying to install new modules even re-installed python to get newest version, and keeps failing!
Modules I have tried
pip install pyaudio
pip install smtplib
AND MANY Others
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:\program files (x86)\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\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\marcu\AppData\Local\Temp\pip-record-dwdolxb5\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\marcu\AppData\Local\Temp\pip-install-9lkkindd\pyaudio\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-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:\program files (x86)\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\marcu\\AppData\\Local\\Temp\\pip-install-9lkkindd\\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\marcu\AppData\Local\Temp\pip-record-dwdolxb5\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
yes you must download visual c++ 14 on microsoft website(optionnal) before! try after install
update your pip also!
try this link https://www.techspot.com/downloads/6776-visual-c-redistributable-package.html

pip install python-pyaudio fails on Windows [duplicate]

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

Categories

Resources