Install portaudio using homebrew (or method of your choice)
brew install portaudio
create $HOME/.pydistutils.cfg using the include
and lib
directories of your portaudio install:
[build_ext]
include_dirs=/Users/jrobert1271/homebrew/Cellar/portaudio/19.20140130/include/
library_dirs=/Users/jrobert1271/homebrew/Cellar/portaudio/19.20140130/lib/
Then in your virtualenv:
pip install --allow-external pyaudio --allow-unverified pyaudio pyaudio
macOS 10.14.6
This solved it for me:
pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio