Skip to content
Advertisement

when installing pyaudio, pip cannot find portaudio.h in /usr/local/include

I’m using mac osx 10.10 As the PyAudio Homepage said, I install the PyAudio using

JavaScript

the installation of portaudio seems successful, I can find headers and libs in /usr/local/include and /usr/local/lib but when I try to install pyaudio, it gives me an error that

JavaScript

actually it is in /usr/local/include why can’t it find the file? some answers to similar questions are not working for me(like using virtualenv, or compile it manually), and I want to find a simple way to solve this.

Advertisement

Answer

Since pyAudio has portAudio as a dependency, you first have to install portaudio.

JavaScript

Then try: pip install pyAudio. If the problem persists after installing portAudio, you can specify the directory path where the compiler will be able to find the source programs (e.g: portaudio.h). Since the headers should be in the /usr/local/include directory:

JavaScript
Advertisement