How to install pyaudio? pip Install pyaudio, Giving error

Viewed 1862
pip install pyaudio

Giving error,

ERROR: Command errored out with exit status 1: 'c:\users\admin\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\setup.py'"'"'; file='"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\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\admin\AppData\Local\Temp\pip-record-q8jvhxle\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\appdata\local\programs\python\python38-32\Include\pyaudio' Check the logs for full command output.


Regards,
Neha
3 Answers

I had the same problem. you should install pyaudio offline.
First, download the whl file from here then install it.

pip install <downloaded file here>

In my case:

pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl

Shot

Windows wheels are the most popular packages for nearly all modern Python versions, including the latest PyAudio.
please attention, you should download the version is capable with your system. If you got error like this: ERROR: PyAudio-0.2.11-cp39-cp39-win32.whl is not a supported wheel on this platform.
try another file until installing successfully.

PyAudio

Includes ASIO, DS, WMME, WASAPI, WDMKS support.
PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
PyAudio‑0.2.11‑cp39‑cp39‑win32.whl
PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl
PyAudio‑0.2.11‑cp38‑cp38‑win32.whl
PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl    #this version worked for me
PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win_amd64.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win32.whl
...

Check out this answer too.

  • Go to website and download the version of pyaudio as per your Python version from here.

  • Browse the directory where the file is downloaded.

  • Open command prompt there

  • Type command pip install <filename.extension> in my case pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl

  • It will install

  • Comment if facing issues in above process.

your python version is 3.7 or obove Try

pip install pipwin
pipwin install pyaudio
Related