pip安裝uwsgi報錯
阿新 • • 發佈:2018-11-07
pip安裝uwsgi是報以下錯誤:
[[email protected] ~]# 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更新到最新版本
[[email protected] ~]# python -m pip install --upgrade pip
2、安裝依賴包(主要依賴問題)
[[email protected] ~]# yum -y install python-devel libevent-devel libjpeg-devel zlib-devel
3、重新安裝uwsgi
[[email protected] ~]# pip install uwsgi
備註:
如果安裝pillow模組也遇到類似的問題,需要安裝上述依賴。