First you should run this sudo apt-get build-dep python-imaging
which will give you all the dependencies that you might need
Then run sudo apt-get update && sudo apt-get -y upgrade
Followed by sudo apt-get install python-pip
And then finally install Pil pip install pillow