在OpenSuse中安装PyAudio 42.1 Leap Linux错误:命令'gcc'失败,退出状态为1

时间:2017-05-29 14:40:36

标签: python linux gcc

我使用的是OpenSuse linux 42.1 leap 64 bit操作系统。我想使用PyAudio库并使用'pip install PyAudio',但我无法安装它,因为'错误:命令'gcc'失败,退出状态1'不断出现......

我也尝试了以下命令:

sudo zypper install python-pyaudio
sudo zypper install pyaudio
sudo zypper install python-PyAudio
sudo zypper install portaudio19-devel
sudo zypper install portaudio19-dev
sudo zypper install libjack-jack2-devel portaudio19-devel
sudo zypper install libjack-jack2-dev portaudio19-dev

但是在输出之后我得到了......类似于上面的所有命令..

'Loading repository data...
Reading installed packages...
'pyaudio' not found in package names. Trying capabilities.
No provider of 'pyaudio' found.
Resolving package dependencies...

Nothing to do.'

我已经使用

安装了python标头
sudo zypper install python-devel

请有人帮帮我吗?

以下是pip安装PyAudio输出:

Collecting PyAudio
  Using cached PyAudio-0.2.11.tar.gz
Building wheels for collected packages: PyAudio
  Running setup.py bdist_wheel for PyAudio ... error
  Complete output from command /home/jesus/Documents/anaconda3/envs/python3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yblkkkko/PyAudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpn7wy6nilpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  copying src/pyaudio.py -> build/lib.linux-x86_64-3.5
  running build_ext
  building '_portaudio' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/src
  gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jesus/Documents/anaconda3/envs/python3/include/python3.5m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.5/src/_portaudiomodule.o
  src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
   #include "portaudio.h"
                     ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for PyAudio
  Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
  Running setup.py install for PyAudio ... error
    Complete output from command /home/jesus/Documents/anaconda3/envs/python3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yblkkkko/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-4gamezy0-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying src/pyaudio.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jesus/Documents/anaconda3/envs/python3/include/python3.5m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.5/src/_portaudiomodule.o
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
 #include "portaudio.h"
                       ^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/home/jesus/Documents/anaconda3/envs/python3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yblkkkko/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-4gamezy0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yblkkkko/PyAudio/

0 个答案:

没有答案