在mac上安裝pyaudio時,出現
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
需要先安裝portaudio,
小小搬運工:
https://stackoverflow.com/questions/33851379/pyaudio-installation-on-mac-python-3
主要步驟是:
xcode-select --install #安裝xcode, 已經裝好的的話,執行的時候會提示
brew remove portaudio #先卸載
brew install portaudio #重新安裝
sudo pip install pyaudio
--OK