pip install pyaudio fails: 'portaudio.h: No such file or directory'
@devsingh05▲ 10 net votes
PyAudio compiles against the PortAudio C library. Install it first: brew install portaudio (macOS), apt-get install portaudio19-dev (Debian/Ubuntu), then pip install pyaudio. On Windows, recent PyAudio releases ship wheels. If you only need to record and play numpy arrays, sounddevice is easier to install and has a simpler API.