Reputation: 41
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'
Upvotes: 4
Views: 7745
Reputation: 868
For Windows OS run:
pip install pipwin
pipwin install pyaudio
For Linux OS run:
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
pip install pyaudio --user
check this link for more info: https://www.codegrepper.com/code-examples/python/install+pyaudio+pip3+ubuntu
Upvotes: 4
Reputation: 469
I don't know if this will make any difference but try installing pyaudio (all lowercase).
pip install pyaudio
I recreated your error and import pyaudio
works but import PyAudio
doesn't work.
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
"
Upvotes: -2