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

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

问题

安装fdfs-client-py和uwsgi的时候报如下错误,

1.unable to execute 'gcc': No such file or directory

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

解决方法

centos 7中默认安装了python2的环境,但是没有python3,如果我们要使用python3的编译环境,需要自己来安装。

安装python3之前,有一些库环境需要先安装,这个非常重要,不安装运行python3会出现各种问题。

yum install gcc patch libffi-devel python-devel python3-devel.x86_64  zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
原文地址:https://www.cnblogs.com/ryxiong-blog/p/13027866.html