Can't Install PyAudio in Python 3.8

Viewed 6980

I have an issue with PyAudio I Have installed PyAudio in Python 3.6 and Python 3.8 via Python unofficial libraries.

C:\Users\Baali>pip install --user PyAudio

Successfully installed PyAudio-0.2.11

But when I tried to import PyAudio it says:

import PyAudio

Traceback (most recent call last):
File "", line 1, in ModuleNotFoundError: No module named 'PyAudio'

2 Answers

I don't know if this will make any difference but try installing pyaudio (all lowercase).

pip install pyaudio


Update 1:

I recreated your error and import pyaudio works but import PyAudio doesn't work.

enter image description here


Update 2:

I extracted the following directions from this post:

ModuleNotFoundError: No module named 'pyaudio' (Windows)

"General solution (for Windows)

The best thing is not to rely on your system PATH. Use the py launcher to select the version you want. To run the pip module corresponding to the Python version you want to use, start pip as a module instead of executable. So instead of:

pip install <package>

run (try 3.8 here instead of 3.6):

py -3.6 -m pip install <package>

To see which Python packages you have installed for that Python version, use:

py -3.6 -m pip freeze"

Related