Can't install Python Imaging Library using pip

2019-04-30 03:44发布

When trying to install Python Imaging Library(PIL) using PIP, the installation failed with the following error:

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).

The pip.log file is provided here: http://pastebin.com/YeBLmMBm

标签: python pip
1条回答
\"骚年 ilove
2楼-- · 2019-04-30 04:15

There is a new fork of PIL called Pillow which seems to work more consistently than PIL for a lot of people. It's easy to install also. Look here(for info/docs) and here(to install). Though I think pip install Pillow should work

查看更多
登录 后发表回答