I found a solution here but it seems to only work with python 2.7 and I need it for python 3.2. Also how do I uninstall a library?
I finally found out the solution. I ran this in the terminal:
sudo apt-get install libjpeg8-dev find /usr/lib -name libjpeg.so /usr/lib/arm-linux-gnueabihf/libjpeg.so sudo ln -s /usr/lib/arm-linux-gnueabihf/libjpeg.so /usr/lib/ sudo pip-3.2 install PIL