python - Installing pyaudio with pip in a virtualenv -
i'm trying install pyaudio pip:
pip install pyaudio
in virtualenv i'm getting error:
error: command 'x86_64-linux-gnu-gcc' failed exit status 1
entire output:
collecting pyaudio using cached pyaudio-0.2.9.tar.gz building wheels collected packages: pyaudio running setup.py bdist_wheel pyaudio ... error complete output command /home/mertyildiran/downloads/virtualenvironment/vir1/cerebrum/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-gcltlv/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpyr6j73pip-wheel- --python-tag cp27: running bdist_wheel 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 -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: no such file or directory #include "portaudio.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed exit status 1 ---------------------------------------- failed building wheel pyaudio running setup.py clean pyaudio failed build pyaudio installing collected packages: pyaudio running setup.py install pyaudio ... error complete output command /home/mertyildiran/downloads/virtualenvironment/vir1/cerebrum/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-gcltlv/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-icmiuv-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/mertyildiran/downloads/virtualenvironment/vir1/cerebrum/env/include/site/python2.7/pyaudio: 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 -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: no such file or directory #include "portaudio.h" ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed exit status 1 ---------------------------------------- command "/home/mertyildiran/downloads/virtualenvironment/vir1/cerebrum/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-gcltlv/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-icmiuv-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/mertyildiran/downloads/virtualenvironment/vir1/cerebrum/env/include/site/python2.7/pyaudio" failed error code 1 in /tmp/pip-build-gcltlv/pyaudio
what doing wrong? i'm new in virtualenvs.
*i'm able install other packages. i'm facing error pyaudio package.
by way i'm in environment:
(env) mertyildiran@corsair:~/downloads/virtualenvironment/vir1/myproject$
some packages require support of non-python software, such shared libraries. these cannot installed via pip (they're not python packages!). install these on host using host's package manager (apt-get
or yum
or dnf
, etc...), or use docker encapsulate both dependencies , application.
in case, pyaudio requires number of libraries, including @ least portaudio
. need install appropriate development packages on system, suggested in comments on question.
Comments
Post a Comment