5

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

Sayem
  • 6,079
  • 4
  • 22
  • 26

1 Answers1

8

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

Totem
  • 7,189
  • 5
  • 39
  • 66
  • 2
    Thanks. I was trying to install PIL for ImageField in Django, I found a workaround with Pillow [here](http://stackoverflow.com/questions/15080121/how-to-use-pillow-with-django). – Sayem Dec 16 '13 at 15:30