아래와 같이 명령어를 입력하여
pyaudio를 설치하려 했다.
그러자 엄청난 에러가 발생했다.
$ sudo pip install pyaudio
에러들....
Downloading/unpacking pyaudio
Downloading PyAudio-0.2.9.tar.gz (289kB): 289kB downloaded
Running setup.py (path:/tmp/pip-build-vnFPg1/pyaudio/setup.py) egg_info for package pyaudio
warning: no files found matching '*.c' under directory 'test'
Installing collected packages: pyaudio
Running setup.py install for pyaudio
building '_portaudio' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -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-armv7l-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:28:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-vnFPg1/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BIgurJ-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
copying src/pyaudio.py -> build/lib.linux-armv7l-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/src
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -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-armv7l-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:28:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-vnFPg1/pyaudio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BIgurJ-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-vnFPg1/pyaudio
Storing debug log for failure in /home/pi/.pip/pip.log
해결책은 아래와 같이 python-dev를 먼저 설치해주면 된다.
$ sudo apt-get install python-dev
'리눅스 > 문제해결' 카테고리의 다른 글
ssh 접속시 루트(root) 제한(Permission denied) 해제하는 방법 (0) | 2017.01.24 |
---|---|
Your dtc is too old, please upgrade to dtc 1.4 or newer (0) | 2016.12.11 |
Your display is too small to run Menuconfig! (0) | 2016.12.08 |
[LTIB 빌드 에러] dhcp Unknown system. (0) | 2016.12.08 |
부팅시 iMX6 - Galcore version 4.6.9.9754 에서 멈추는 문제 (0) | 2016.12.07 |