install pyaudio with macOs Sierra

随声附和 提交于 2019-12-05 17:37:31

Thanks for the suggestion. I tried it but it did not work. It seems pip is not finding both include files and libraries when attempting to install in macOS Sierra

I did some digging into how to pass paths with pip and I successfully installed pyaudio using the following command.

sudo pip -v install --global-option=build_ext --global-option="-I/usr/local/Cellar/portaudio/19.20140130/include" --global-option="-L/usr/local/opt/portaudio/lib" pyaudio

Please try the command below.

sudo CPATH="$CPATH:/usr/local/include" LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" pip install pyaudio

You can add the directory to your CPATH. Try:

CPATH="$CPATH:/usr/local/Cellar/portaudio/19.20140130/include"
pip install pyaudio
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!