首页 » 编程设计

python之使用 pip 从 Web 项目的 requirements.txt 安装时出错

2025年05月04日2798°冷暖

这是我收到的错误信息

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xGZuOG-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow 

sudo pip install -r requirements.txt 的完整终端输出是 http://pastebin.com/CAvW67f2

需求内容:

Django==1.6.1 
EasyProcess==0.1.6 
Pillow==2.3.0 
South==0.8.4 
Whoosh==2.6.0 
bottle==0.11.6 
dj-database-url==0.2.2 
dj-static==0.0.5 
django-bootstrap3==2.6.1 
django-toolbelt==0.0.1 
gunicorn==18.0 
httplib2==0.8 
pyscreenshot==0.3.2 
pystache==0.5.3 
python-instagram==0.8.0 
simplejson==3.3.2 
static==1.0.2 
wsgiref==0.1.2 
yolk==0.4.3 

我完全迷路了 - 感谢您对此的任何帮助

请您参考如下方法:

在安装之前尝试在你的 bash 中运行它:

export CFLAGS=-Qunused-arguments 
export CPPFLAGS=-Qunused-arguments 

Source


阅读延展