plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory

时间:2019-08-20 17:58:28  来源:igfitidea点击:

在使用"pip install uwsgi”为Django安装uwsgi时。报错:

Error: *** uWSGI compiling embedded plugins ***
[gcc -pthread] plugins/python/python_plugin.o
In 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
compilation terminated.

解决方案

安装python-dev包。

sudo apt-get install python2.7-dev