python 3.8 install pyaudio pip3 install pyaudio error: Microsoft Visual C++ 14.0 or greater is required.

created at 11-16-2021 views: 35


E:\Eprogramfiles\Anaconda3\envs\myenvpy38>pip3 install pyaudio
Collecting pyaudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Using legacy ' install' for pyaudio, since package 'wheel' is not installed.
Installing collected packages: pyaudio
    Running install for pyaudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-m6oeci17\\pyaudio_c8557100e30446cabb941c1c6428849d\\'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-install-m6oeci17\\pyaudio_c8557100e30446cabb941c1c6428849d\\'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code ='"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-49wse8x_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python38\Include\pyaudio'
         cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-m6oeci17\pyaudio_c8557100e30446cabb941c1c6428849d\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\
    copying src\ -> build\
    running build_ext
    building '_portaudio' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":


It has nothing to do with whether Visual C++ 14.0 or greater is installed.

visual studio


Pyaudio installed directly with pip does not support 3.7, so an error will be reported during installation or import.
So directly download the whl file and install it.

whl download address:

Switch to the whl file directory and install directly with pip

pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl

pip install

created at:11-16-2021
edited at: 11-16-2021: