I see this question asked all over the internet, and I\'ve tried following them all, but I still can\'t get PIL to work.
I tried symbolically linking the zlib, jpeg, et
I found it to be a combination of the two above when installing with a requirements.txt on Ubuntu. I'm using Vagrant to run a chef script, and found this approach works best for me:
First, I use a bash script to setup PIL:
#!/usr/bin/env bash
sudo apt-get build-dep python-imaging
sudo ln -s -f /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s -f /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s -f /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
Next, during the requirements.txt install, the top of the file looks like:
--allow-external PIL
--allow-unverified PIL
Django==1.5.4
PIL==1.1.7
...
Of course, this is an unsecured way of doing it, but works for dev and quick builds. For production, it's best to download and verify all packages manually and install them from a local managed repository.