Installing PIL properlyAugust 9, 2009...... at 12:41 pm | Posted in Uncategorized | 2 Comments
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).
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