已解决fatal error: Python.h: No such file or directory
文章目录
- 报错问题
- 解决方法
- 声明
报错问题
之前在工作中遇到过这个坑,记录一下问题以及解决方法,不一定针对所有情况都能用,但是可以供大家参考。
问题描述如下:
[gcc -pthread] core/zlib.o
[gcc -pthread] core/regexp.o
[gcc -pthread] core/routing.o
[gcc -pthread] core/yaml.o
[gcc -pthread] core/ssl.o
[gcc -pthread] core/legion.o
[gcc -pthread] core/xmlconf.o
[gcc -pthread] core/dot_h.o
[gcc -pthread] core/config_py.o
*** 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
#include <Python.h>
^
compilation terminated.
----------------------------------------
Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dsr9i4nq/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9835ofpr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-dsr9i4nq/uwsgi/
解决方法
解决方法如下
yum install python34-devel
安装完后,接着pip安装uwsgi
声明
解决方法参考网络,如有侵权联系我删除