pip安装uwsgi报错

xiaoxiao2025-05-07  48

pip安装uwsgi是报以下错误:

[root@localhost ~]# pip install uwsgi

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

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

转载请注明原文地址: https://www.6miu.com/read-5030027.html

最新回复(0)