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

This entry was posted in Python module and tagged , . Bookmark the permalink.

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

  1. Gump says:

    Wow! That’s a rlealy neat answer!

  2. Jor says:

    Even easier:
    sudo pip uninstall PIL
    sudo pip install pillow

    pillow has applied a patch adding these dirs

  3. Juan Odicio says:

    Thank you so much! I’ve lost many hours trying to sort this out.

  4. Angel Medrano says:

    THANKS! That worked for me :)

  5. [...] How to create user postgresql using Pgadmin Ubuntu Recent Commentsadmin on Create simple search page with custom pagination in Django 1.3Jayson Weyker on Create simple search page with custom pagination in Django 1.3admin on Automatically delete file in filefield Django 1.3 when object / record deletedhaineault on Automatically delete file in filefield Django 1.3 when object / record deletedAngel Medrano on Install python PIL ( Python image Library ) on Ubuntu 11.10 OneiricArchives [...]

  6. Matthew Farver says:

    I have bookmarked this page so that every time I run into this problem (and of course forget how to fix it) I can come back here. Thanks a lot for this very useful blog post!

  7. Sergio says:

    Thanks!

  8. Roel kramer says:

    Thanks! Very clear guide.

  9. Sushant Taneja says:

    Thanks a lot !
    The instructions helped me a lot saving a lot of time :)

  10. Mariano says:

    Thanks a lot, it has been really helpful.

  11. [...] had some issues while installing PIL on Ubuntu. According to Yodiaditya, the packages are installed in a different path that PIL usually look into [...]

  12. mz says:

    Thank you, your are my life-safer!

  13. Ralf says:

    Thanks…for me it also fixed the problem for “encoder zip not available” on Ubuntu 12.04 64bit

  14. django dev says:

    thanks a lot.

  15. Shawn says:

    Thanks. I tried quite a few solutions, but worked exactly as written.
    I was trying to solve the “IOError: decoder zip not available”.
    Cheers.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>