Wednesday, May 23, 2012

[Ubuntu] Install PIL in Virtualenv

I look everywhere on how to install PIL without a hitch. After a few reading, searching, frustrations, installing and uninstalling, I finally found the one that works for me (and for you might as well).

Follow the steps on how to install PIL:
1 install the needed libraries
sudo apt-get install libjpeg-dev libpng-dev zlib1g-dev liblcms1-dev python-dev

2 install the dependencies needed to build PIL
sudo apt-get build-dep python-imaging

3 run these commands
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/

4 Lastly, install PIL
pip install PIL

You should at least see this somewhere
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    --- FREETYPE2 support available

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...