【发布时间】:2013-12-16 23:16:34
【问题描述】:
尝试使用 PIP 安装 Python Imaging Library(PIL) 时,安装失败并出现以下错误:
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip_build_root/pil/setup.py", line 182
print "--- using Tcl/Tk libraries at", TCL_ROOT
Somebody else 面临同样的问题,但提供的解决方案适用于不同的库,对我不起作用。在官方邮件列表中有一个旧条目 (2003) 讨论了该问题,但没有提供解决方案,而是要求降级 PIL 并稍后提供修复(我不想降级)。
此处提供了 pip.log 文件:http://pastebin.com/YeBLmMBm
【问题讨论】:
-
据我所知,无法使用
pip安装PIL。这就是存在替代Pillow的原因。