mac下安裝pyaudio

在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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章