I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?
Solution 1:
The answer by Agalin is already great and I just want to explain it in a step by step format for a novice like myself:
- find your Python version by
python --version
mine is3.7.3
for example - the easiest way to check either you have 64 or 32 Python just open it in the terminal:
- find the appropriate
.whl
file from here, for example mine isPyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
, and download it. - go to the folder where it is downloaded for example
cd C:\Users\foobar\Downloads
- install the
.whl
file withpip
for example in my case:
pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl
Solution 2:
First run your IDE or CMD as Administrator and run the following:
pip install pipwin
pipwin install pyaudio
Solution 3:
There is no wheel (prebuilt package) for Python 3.7 on Windows (there is one for Python 2.7 and 3.4 up to 3.6) so you need to prepare build environment on your PC to use this package. Easier would be finding the wheel for 3.7 as some packages are quite hard to build on Windows.
Christoph Gohlke (University of California) hosts Windows wheels for most popular packages for nearly all modern Python versions, including latest PyAudio. You can find it here: https://www.lfd.uci.edu/~gohlke/pythonlibs/ (download can be quite slow). After download, just type pip install <downloaded file here>
.
There is no difference between python -m pip install
, and pip install
as long as you're using default installation settings and single python installation. python pip
actually tries to run file pip
in the current directory.
Edit. See the pipwin
comment for automated way of using Mr Gohlke's libs . Note that I've not used it myself and I'm not sure about selecting different package flavors like vanilla and mkl versions of numpy
.