learning-unlimited/ESP-Website — pull request #743 by jmoldow (2013-10-08 08:31:02+00:00)
Title: Fixes PIL dependency

Teachers without biography photos were generating 500 errors on their
biography pages. This was happening with the assignment
teacherbio.picture = 'images/not-available.jpg'.
PIL was throwing the exception "decoder jpeg not available".

libjpeg-dev is a dependency for PIL jpeg decoder support. See
.
This is now added as a dependency.

The bug remained after making this change. Further investigation revealed that
PIL does not easily support virtualenv. It looks for the jpeg decoder files in
a fixed directory; see

and .

PIL has not been updated since 2009, and it is unlikely that virtualenv
support will be added. However, the Pillow package, a fork of PIL, does
support virtualenv, and is under active development. See
and .

This commit changes the dependency on PIL to a dependency on Pillow. After
uninstalling PIL and installing Pillow, the bug is fixed. However, manage.py
validate will complain about the lack of PIL.

If PIL is already installed in the virtualenv, the following commands must be
run to uninstall PIL:
$ source env/bin/activate
$ pip uninstall PIL