1. 根据机器python环境版本进行安装
pip/pip3 install uwsgi
安装可能报错
?[gcc -pthread] plugins/python/python_plugin.o ??? In file included from plugins/python/python_plugin.c:1: ??? plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory ???? #include <Python.h> ????????????? ^~~~~~~~~~ ??? compilation terminated.
解决方案:
安装? python-devel? 库,注意:安装前请先查看python具体版本(python/python3? --version),根据python版本安装对应的库,不对应可能会失败,错误类似如下:
Last metadata expiration check: 0:39:14 ago on Tue 12 Oct 2021 03:59:08 PM CST. No match for argument: python-devel Error: Unable to find a match: python-devel
例如本机python环境为:Python 3.6.8
执行安装
yum install python36-devel
|