Install python PIL ( Python image Library ) on Ubuntu 11.10 Oneiric


Installing PIL in Ubuntu 11.10 Oneiric 64-bit using pip raise problem on JPEG, Zlib or freetype support. First, you need to uninstall PIL by :

1
sudo pip uninstall PIL

Then you should install default Ubuntu packages :

1
sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev

We should fix PIL path libraries by :

1
2
3
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib


Now we are ready installing PIL by :

1
sudo pip install -U PIL

And you will get results :

1
2
3
4
5
6
7
8
9
10
11
12
13
 ——————————————————————–
    PIL 1.1.7 SETUP SUMMARY
    ——————————————————————–
    version       1.1.7
    platform      linux2 2.7.2+ (default, Oct  4 2011, 20:06:09)
                  [GCC 4.6.1]
    ——————————————————————–
    *** TKINTER support not available
    — JPEG support available
    — ZLIB (PNG/ZIP) support available
    — FREETYPE2 support available
    *** LITTLECMS support not available
    ——————————————————————–

This is also solve PIL problem “decoder zip not available“.
Kudos to JJ 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.