Trying to install pyaudio with instructions per here:
$ git clone http://people.csail.mit.edu/hubert/git/pyaudio.git $ cd pyaudio $ sudo python setup.py install running install running build running build_py running build_ext building '_portaudio' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o In file included from /usr/include/python2.7/Python.h:8:0, from src/_portaudiomodule.c:28: /usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default] /usr/include/features.h:215:0: note: this is the location of the previous definition src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1
What's going wrong in my installation?
pyaudio is not supported with python 3.7.
Sorry about the inappropriate answer last time, I will post the solution of the question. It might be helpful for Ubuntu distributions.
First we need to install portaudio modules: sudo apt-get install libasound-dev
Download the portaudio archive from: http://files.portaudio.com/download.html
Unzip the archive: tar -zxvf [portaudio.tgz]
Enter the directory, then run: ./configure && make
Install: sudo make install
And finally: sudo pip install pyaudio
Check the version of pyaudio, it should be 0.2.9
This worked for me:
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 sudo apt-get install ffmpeg libav-tools sudo pip install pyaudio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With