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

While installing uwsgi for Django with Nginx pip install uwsgi .
I got this error, “plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory”.

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.

Solution: To fix this issue, install python-dev package.

sudo apt-get install python2.7-dev

Download link for reference : http://projects.unbit.it/downloads/uwsgi-1.9.12.tar.gz

4 thoughts on “plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.