python - 错误 : command 'x86_64-linux-gnu-gcc' failed with exit status 1 while installing pygsr,

标签 python linux gcc

我在 Ubuntu 16.04 LTS 中使用 Python 2.7.12。我尝试使用命令安装 pyaudiopygsr

sudo pip install -U pyaudio
sudo pip install -U pygsr

我得到如下输出(错误):

    Collecting pyaudio
  Downloading PyAudio-0.2.10.tar.gz (287kB)
    100% |████████████████████████████████| 296kB 762kB/s 
Installing collected packages: pyaudio
  Running setup.py install for pyaudio ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Unc_F6/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2uTcg2-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
    running build_ext
    building '_portaudio' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -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: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Unc_F6/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2uTcg2-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Unc_F6/pyaudio/

最佳答案

好吧,我用包管理器解决了这个问题,

 $ sudo apt-get install python-pyaudio

尽管仍然不知道为什么 easy_install 会失败。

关于python - 错误 : command 'x86_64-linux-gnu-gcc' failed with exit status 1 while installing pygsr,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42783105/

相关文章:

linux - 获取目录中递归包含的文件列表的最快方法是什么?

c++ - 构造函数继承和直接成员初始化

c++ - 如何将立即数 4 位值传递给 _mm256_blend_pd 的最后一个参数

c - 列出可执行文件中的全局变量

python - 按条件查找dataframe中行和列的所有索引

python - 使用行和列值插入缺失值

Python-检查列是否包含列表中的值,返回值

python - 无法更改特定位置数据帧的值

linux - Erlang:守护进程 'init.d' 脚本无法启动

linux - 在 AMAZON Linux AMD 本地安装 php Composer.phar