Installing PIL properly

August 9, 2009...... at 12:41 pm | In Uncategorized | 1 Comment

I love virtualenv and easy_install but using the latter to install PIL has in the past proved problematic as it is often not found. I thought my worries were over when I found this little gem on the internet:

easy_install –find-links http://www.pythonware.com/products/pil/ Imaging

But today while debugging mail-server issues I was left scratching my head by a situation where django running over wsgi was finding PIL but runserver wasn’t.

The reason became clear to me after reading http://code.djangoproject.com/ticket/8187 that the problem is that the above method of installing PIL, doesn’t actually install PIL – it installs Imaging (which is a submodule).
Using
pip install http://dist.repoze.org/PIL-1.1.6.tar.gz
gives you a PIL.pth file in your site-packages and the ability to import PIL

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. mmm I get loads or errors by running this command with pip when gcc tries to compile PIL…


Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.