2
votes

I've been trying to install PyAudio for a speechrecognition project but for everything I've tried nothing has worked. I tried to install with the latest version of python (3.7) only to noobishly find out that pyaudio isnt compatible with that yet and now im trying with 3.4.

However, whenever I run 'pip install PyAudio' I get an error message saying 'error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).' I have Microsoft Visual C++ 10.0 installed but it just doesn't work.

I'm at my wits end here please help.

(Running Windows 8.1 btw)

4
Make sure the pip you're running is actually the pip for your Python 3 install. To be sure, better to run python3.4 -m pip install .... Then make sure to see stackoverflow.com/questions/2817869/… That said, it does appear that PyAudio has pre-compiled wheels for up to Python 3.6 on Windows so I'm not sure why you wouldn't be getting those: pypi.org/project/PyAudio/#files - Iguananaut
What program do i run 'python3.4 -m pip install' on? also the other question doesn't really answer anything as I've tried installing multiple different versions of visual studio. Also how do i run the setup.py from the tar.gz file from that link? I'm pretty new to pip and modules and need some help D: - Steve Mustache
What do you mean by "What program do i run 'python3.4 -m pip install' on?" Any command line... - Iguananaut
I forgot that on Windows Python doesn't normally install the pythonX.Y aliases. What I mean is just make sure you are running pip with the correct Python interpreter. When I ran C:\Python34\python -m pip install pyaudio it simply installed the pre-built wheel. - Iguananaut

4 Answers

2
votes

A good site to know about is Christoph Gohlke's page "Python Extension Packages for Windows" at https://www.lfd.uci.edu/~gohlke/pythonlibs/.

1
votes

I ended up solving my own problem by downloading a different version of python, the one that worked for me was Python 3.6.5rc1 (but any 3.6 version seems to work) (Found here: https://www.python.org/downloads/release/python-365rc1/ ) I don't know the full details of why this worked as I'm not the best at this kind of thing yet but it worked when I retried python -m pip install pyaudio(this installed pyaudio successfully)

0
votes

First upgrade pip to pi3 using following command:

pip3 install --upgrade setuptools pip

and then try with

pip3 install pyaudio

It will install but old versions PyAudio-0.2.11.tar.gz, PyAudio-0.2.11-cp36-cp36m-win_amd64.whl, PyAudio-0.2.11-cp36-cp36m-win_amd64.whl, not support to python 3.7 and after it

0
votes

Download file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio , get the file for your Python version and bitness. Paste the file of interest in location "C:\Users\YOUR_USER_NAME"

Install it with pip install filename.whl