pip安装uwsgi是报以下错误:
[root@localhost ~]# pip install uwsgiCommand “/usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-install-uqbRn0/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-record-C6Qm8w/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-uqbRn0/uwsgi/
1、首先将pip更新到最新版本
[root@localhost ~]# python -m pip install --upgrade pip2、安装依赖包(主要依赖问题)
[root@localhost ~]# yum -y install python-devel libevent-devel libjpeg-devel #在centos8.0中,python版本是3.6的,这时需要安装 [root@localhost ~]# yum -y install python3-devel libevent-devel libjpeg-devel3、重新安装uwsgi
[root@localhost ~]# pip install uwsgi备注: 如果安装pillow模块也遇到类似的问题,需要安装上述依赖。