无法使用pip安装Python Imaging Library

Say*_*yem 5 python pip

尝试使用PIP安装Python映像库(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
Run Code Online (Sandbox Code Playgroud)

有人还面临着同样的问题,但所提供的解决方案是为一个不同的库,对我没有工作.在官方邮件列表中有一个旧条目(2003)讨论了问题,但没有提供解决方案,要求降级PIL并稍后提供修复(我不想降级).

pip.log文件在这里提供:http://pastebin.com/YeBLmMBm

Tot*_*tem 8

有一个名为Pillow的PIL新分支,对于很多人来说,它似乎比PIL更加一致.它也很容易安装.看这里(信息/文档)和这里(安装).虽然我认为pip install Pillow应该有效

  • 谢谢.我试图在Django中为ImageField安装PIL,我找到了Pillow [here](http://stackoverflow.com/questions/15080121/how-to-use-pillow-with-django)的解决方法. (2认同)