I am writing a program in Python on RaspberryPi, But I am getting an error
JavaScript
x
2
1
ImportError No module named pyaudio
2
After that I tried
JavaScript
1
2
1
git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
2
but again get another
JavaScript
1
2
1
fatal: destination path 'pyaudio' already exists and is not an empty directory.
2
Can you please guide me that how do I install PyAudio in RaspberryPi
Advertisement
Answer
Remove the directory PyAudio which already presen in /home/pi and then try these steps
JavaScript
1
12
12
1
sudo apt-get install git
2
3
sudo git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
4
5
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
6
7
sudo apt-get install python-dev
8
9
cd pyaudio
10
11
sudo python setup.py install
12
or also you can try this
JavaScript
1
2
1
sudo apt-get install python-pyaudio
2
let us know if u need more assistance or any other trouble