正在尝试安装pyaudio,安装说明为per here:
$ git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
$ cd pyaudio
$ sudo python setup.py install
running install
running build
running build_py
running build_ext
building '_portaudio' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
In file included from /usr/include/python2.7/Python.h:8:0,
from src/_portaudiomodule.c:28:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:215:0: note: this is the location of the previous definition
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
我的装置怎么了?
很抱歉上次回答不恰当,我会把问题的答案贴出来。这可能对Ubuntu发行版有帮助。
首先我们需要安装portaudio模块:
sudo apt-get install libasound-dev
从以下位置下载portaudio存档:http://portaudio.com/download.html
解压缩存档:
tar -zxvf [portaudio.tgz]
输入目录,然后运行:
./configure && make
安装:
sudo make install
最后:
sudo pip install pyaudio
检查pyaudio的版本,它应该是
0.2.9
这对我有效:
在Ubuntu上:
或者
相关问题 更多 >
编程相关推荐