pip安装uwsgi报错

pip安装uwsgi是报以下错误:

[root@localhost ~]# pip install uwsgi

pip安装uwsgi报错_第1张图片

Command “/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 pip

2、安装依赖包(主要依赖问题)

[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-devel

3、重新安装uwsgi

[root@localhost ~]# pip install uwsgi

pip安装uwsgi报错_第2张图片

备注:
如果安装pillow模块也遇到类似的问题,需要安装上述依赖。

你可能感兴趣的:(python,uwsgi,failed,with,error,code,1,in,Command,-u,-c)