python-3.xpyaudioraspberry-pi4

ModuleNotFound: No module name pyaudio


I am not able to install pyaudio in raspberry pi..

Tried the command sudo apt install python3-pyaudio

it says python3-pyaudio is already installed.. but when i try to import pyaudio. ModuleNotFound error is thrown...


Solution

  • PyAudio has dependencies that need to be installed. Make sure you have the necessary libraries. Such as :

    sudo apt-get install portaudio19-dev
    

    Also, instead of using the package manager, you can try installing PyAudio using pip.

    pip3 install pyaudio