I\'m using Ubuntu 12.04 and I\'m in PIL-hell. I\'ve tried every suggestion I can find online for ways to install PIL, but I have no luck. I know for a fact I have every de
the simplest way should be the following:
sudo apt-get install python-imaging
if you need to install in a virtualenv, or want the absolute latest version use pip. First install some stuff pil needs, then run the pip install:
sudo apt-get install libjpeg-dev libjpeg62 libjpeg62-dev zlib1g-dev libfreetype6 libfreetype6-dev
pip install PIL
To respond to the comment below. If you take a fresh installation of ubuntu 12.04 and run apt-get install python-imaging you will have PIL installed correctly on your system. on my ubuntu 12.04 box when I run selftest.py I get the following output:
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from /usr/lib/python2.7/dist-packages/PIL
Binary modules loaded from /usr/lib/python2.7/dist-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok
*** TKINTER support not installed
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--- LITTLECMS support ok
--------------------------------------------------------------------
PNG support which you are looking for shows as ok. I suspect that your python installation is probably in some sort of corrupt state. Maybe the symlinking you mentioned or other attempts at installing this package has corrupted your installation. There are three recommendations I can give for correcting this situation
Solutions
apt-get purge python-imaging and then re-install the python-imaging package.