from:http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/
I am posting this because it took me ages to the figure out how to solve this one.
I could not get PIL to compile with JPEG, Zlib or FreeType in my virtualenv. I am using Ubuntu oneiric Beta1 on a Lenovo Thinkpad X220. That's a 64bit installation.
As read in every blog post off there, you first need to install the system libraries so PIL can find them.
$ sudo apt-get install libjpeg libjpeg-dev libfreetype6 Libfreetype6-dev Zlib1g-dev
After that, the your regular should work under the most pip install PIL
situations. In my case I am still seeing this summary after the installation:
--------------------------------------------------------------- * * * TKINTER support not available ---JPEG Support does available ---ZLIB (png/zip) support not available ---FREETYPE2 support not available * * * Littlec MS support Not available ---------------------------------------------------------------
After a iot of Googling around, I found this solution on Ubuntu forums.
It turns out that the APT installations put the libraries under and /usr/lib/x86_64-Linux-gnu
PIL would search for them in /usr/lib/
. So you had to create symlinks for PIL to see them.
# ln-s/usr/lib/x86_64-linux-gnu/libjpeg.so/usr/lib# ln-s/usr/lib/x86_64-linux-gnu/libfreetype.so/usr/lib# ln-s/US R/lib/x86_64-linux-gnu/libz.so/usr/lib
Now proceed and Reinstal PiL, pip install -U PIL
:
--------------------------------------------------------------- * * * TKINTER support not available ---JPEG Support Available ---ZLIB (png/zip) support available ---FREETYPE2 support available * * LITTLECMS support Not available ---------------------------------------------------------------
Tada!
Update:
I just had this issue again on Ubuntu precise, I found a solution here:
http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204-precise-pangolin/
# ln-s/usr/lib/' uname-i '-linux-gnu/libfreetype.so/usr/lib/# ln-s/usr/lib/' uname-i '-linux-gnu/libjpeg.so/usr/lib/ # ln-s/usr/lib/' uname-i '-linux-gnu/libz.so/usr/lib/
Note The That uname -i
prints the box ' s arquitecture. This was a much more generic solution!
How to does it on Ubuntu precise Pagolin 12.04
--------------------------------------------------------------------------------
Later, according to http://effbot.org/downloads/#Imaging PIL source installation package in the Readme method to solve more convenient:
sudo install libjpeg62-dev sudoinstall zlib1g-dev sudo install libfreetype6-dev sudoinstall Liblcms1-dev
Install PIL with Jpeg support on Ubuntu oneiric 64bit