Question

install python uwsgi error

Posted June 1, 2017 5.7k views
CentOSPython

I successfully installed uwsgi on local.
But i installed on vps then it’s error.
Currently I do not know how to fix it.
Error message:

*** uWSGI compiling embedded plugins ***
    [Gcc -pthread] plugins / python / pythonplugin.o
    In file included from plugins / python / python
plugin.c: 1: 0:
    Plugins / python / uwsgipython.h: 2: 20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    Compilation terminated.
    
    —————————————-
“/usr/bin/python2.7 -u -c” import setuptools, tokenize; _
file __ = ’/ tmp / pip-build-oONRqq / superset / setup.py’; f = getattr (tokenize, ‘open’, open Exec (compile (code, file, 'exec’)) “install - (__ file __); code = f.read () replace (’\ r \ n’, ’\ n’ -record /tmp/pip-ktDXj1-record/install-record.txt –single-version-externally-managed –compile "failed with error code 1 in / tmp / pip-build-oONRqq /
I look forward to your help.
Thanks you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @pmtrit1010

It’s a little unclear what you’ve tried, but that error looks like you’re trying to compile Python, but don’t have all the files available.

There’s a lot of tutorials on setting up uWSGI here on DigitalOcean:
https://www.digitalocean.com/community/tutorials?q=uwsgi
https://www.digitalocean.com/community/tutorials?q=uwsgi+centos

Maybe this one is what you’re looking for?
https://www.digitalocean.com/community/tutorials/how-to-set-up-uwsgi-and-nginx-to-serve-python-apps-on-centos-7

by Justin Ellingwood
In this guide, we will be setting up a simple WSGI application served by uWSGI. We will use the Nginx web server as a reverse proxy to the application server to provide more robust connection handling. We will be installing and configuring these components on a CentOS 7...
Submit an Answer