尝试使用 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 https://github.com/mbi/django-simple-captcha/issues/28#issuecomment-14169250其他人也面临同样的问题,但提供的解决方案适用于不同的库,对我不起作用。在官方邮件列表中,有一个旧条目(2003)讨论了该问题,但没有提供解决方案,而是要求降级 PIL 并稍后提供修复(我宁愿不降级)。
此处提供 pip.log 文件:http://pastebin.com/YeBLmMBm http://pastebin.com/YeBLmMBm
PIL 有一个新的分支,称为 Pillow,对于很多人来说,它似乎比 PIL 更一致地工作。安装也很容易。看here https://pillow.readthedocs.org/en/latest/(用于信息/文档)和here http://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow(安装)。虽然我觉得pip install Pillow
应该管用
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)