読者です 読者をやめる 読者になる 読者になる

end0tknr's kipple - 新web写経開発

http://d.hatena.ne.jp/end0tknr/ から移転します

python uwsgi install error - Python.h: No such file or directory

エラー内容 - Python.h: No such file or directory

$ sudo pip install uwsgi
    :
[arm-linux-gnueabihf-gcc -pthreadIn file included from plugins/python/python_plugin.c:1:0:
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
               ^
compilation terminated.
    :
[arm-linux-gnueabihf-gcc -pthread] core/config_py.o
*** uWSGI compiling embedded plugins ***
[arm-linux-gnueabihf-gcc -pthread] plugins/python/python_plugin.o
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-dQkMew/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ACw6M6-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-dQkMew/uwsgi
Storing debug log for failure in /root/.pip/pip.log
$

解決策 - python-dev をインストール

$ sudo apt-get install python-dev