Reputation: 39
I am trying to install pyAudio with pip, I have also try pyaudio, I don't know why this is happening , it is showing some error , please some one tell me solution
pip install pyAudio
This is the error
Collecting pyAudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6
b/PyAudio-0.2.11.tar.gz
Installing collected packages: pyAudio
Running setup.py install for pyAudio ... error
ERROR: Complete output from command 'c:\users\sagar sisodiya\appdata\local\programs\python\python37-32\python.exe' -
u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\SAGARS~1\\AppData\\Local\\Temp\\pip-install-lcx2zzgz\\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\SAGARS~1\AppData\Local\Temp\pip-reco
rd-_tc_wql7\install-record.txt' --single-version-externally-managed --compile:
ERROR: 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.m
icrosoft.com/downloads/
----------------------------------------
ERROR: Command "'c:\users\sagar sisodiya\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools,
tokenize;__file__='"'"'C:\\Users\\SAGARS~1\\AppData\\Local\\Temp\\pip-install-lcx2zzgz\\pyAudio\\setup.py'"'"';f=getatt
r(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(c
ode, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\SAGARS~1\AppData\Local\Temp\pip-record-_tc_wql7\install-reco
rd.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\SAGARS~1\AppData\Local\Temp\
pip-install-lcx2zzgz\pyAudio\
Upvotes: 0
Views: 3949
Reputation: 1
For those users who are using Python 3.9
should carry out this procedure, it might help you as it worked fine for me.
pip install pipwin
pipwin install pyaudio
Upvotes: 0
Reputation: 21
pip install pipwin
pipwin install pyaudio
Try these commands in prompt this will definitely work. It does not require any manual downloads or searches etc. It will automatically search for the compatible wheel for your python version and will install it. pipwin is a complementary tool for pip on Windows. pipwin installs unofficial python package binaries for windows provided by Christoph Gohlke
Upvotes: 1
Reputation: 183
You don't need to download or any Microsoft Visual C++ Build Tools. Just do the following, it will fix everything. I had the exact same error. After you go to this link: https://www.lfd.uci.edu/~gohlke/pythonlibs/ select and download the PyAudio for your Python version.
I downloaded:
PyAudio-0.2.11-cp37-cp37m-win_amd64.whl
Place the downloaded file into the Scrips folder. My folder structure is:
`C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts`
Then you need to install the downloaded script by using the command:
python -m pip install "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts\PyAudio-0.2.11-cp37-cp37m-win_amd64.whl"
Upvotes: 0
Reputation: 837
You need to install visual studio
from this link Visual Studio
OR
You can download PyAudio
package from this link Window Binary for python
. In this website go to the PyAudio
package and then download it, Now go to the location where this file is downloaded on your laptop with window PowerShell, AND then run pip install <filename>
.
It will solve your problem.
Upvotes: 0
Reputation: 3957
You should install C++ redistributables, it is emphasized in the traceback output:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
I believe this is a shortcut link to the installation package: http://www.microsoft.com/en-us/download/details.aspx?id=48145
Upvotes: 1