我无法正确安装 pyaudio。我为该项目设置了一个 virtualenv。我首先尝试安装portaudio:
sudo port install portaudio
返回:
---> Cleaning portaudio
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
我认为这意味着它运行良好。然后我尝试了:
pip install pyaudio
返回:
Downloading/unpacking pyaudio
Running setup.py egg_info for package pyaudio
warning: no files found matching '*.c' under directory 'test'
Installing collected packages: pyaudio
Running setup.py install for pyaudio
building '_portaudio' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DMACOSX=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_portaudiomodule.c -o build/temp.macosx-10.6-intel-2.7/src/_portaudiomodule.o -fno-strict-aliasing
src/_portaudiomodule.c:29:23: error: portaudio.h: No such file or directory
src/_portaudiomodule.c:33:25: error: pa_mac_core.h: No such file or directory
...
第一个警告有问题吗?我有点惊讶它说 portaudio.h 没有文件或目录。我必须做一些特别的事情来启用我的端口音频 macport 安装吗?
感谢任何帮助!