Ubuntu14.04 conda install PyAudio 出错:error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

在ubuntu14.04 上安装了Anaconda,想要安装PyAudio ,conda install PyAudio 不管用,出现PackageFoundError,后来自己又到官网下载包,执行
$ sudo python setup.py install
又出错误:
running install
running bdist_egg
running egg_info
writing src/PyAudio.egg-info/PKG-INFO
writing top-level names to src/PyAudio.egg-info/top_level.txt
writing dependency_links to src/PyAudio.egg-info/dependency_links.txt
reading manifest file 'src/PyAudio.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c' under directory 'test'
writing manifest file 'src/PyAudio.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building '_portaudio' extension
x86_64-linux-gnu-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
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: 没有那个文件或目录
 #include "portaudio.h"
                       ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
网上找了很多中办法都不行,崩溃。。。后来又看到别人的博http://blog.csdn.net/qq_23729557/article/details/78956602,因为我的是python2.7 版本所以执行以下两句,就安装好了。(注意后一句要在下载的包根目录下执行)
sudo apt-get install portaudio19-dev python-all-dev   
$ sudo python setup.py install                                                                 

你可能感兴趣的:(Ubuntu14.04 conda install PyAudio 出错:error: command 'x86_64-linux-gnu-gcc' failed with exit status 1)