[英]Can't install Python Imaging Library using pip
When trying to install Python Imaging Library(PIL) using PIP, the installation failed with the following error: 尝试使用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
Somebody else faced the same issue but the provided solution was for a different library and didn't work for me. 有人还面临着同样的问题,但所提供的解决方案是为一个不同的库,对我没有工作。 In the official mailing list there's an old entry(2003) which discusses the problem but instead of providing a solution, asked to downgrade PIL and providing a fix later (I prefer not to downgrade).
在官方邮件列表中有一个旧条目(2003)讨论了问题,但没有提供解决方案,要求降级PIL并稍后提供修复(我不想降级)。
The pip.log file is provided here: http://pastebin.com/YeBLmMBm pip.log文件在这里提供: http ://pastebin.com/YeBLmMBm
There is a new fork of PIL called Pillow which seems to work more consistently than PIL for a lot of people. 有一个名为Pillow的PIL新分支,对于很多人来说,它似乎比PIL更加一致。 It's easy to install also.
它也很容易安装。 Look here (for info/docs) and here (to install).
看这里 (信息/文档)和这里 (安装)。 Though I think
pip install Pillow
should work 虽然我认为
pip install Pillow
应该可行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.