pip uninstall PIL sudo apt-get install libjpeg8-dev sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib pip install PIL
for x32 OS
pip uninstall PIL sudo apt-get install libjpeg8-dev sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib pip install PIL
# sudo apt-get install python-dev libjpeg-dev libfreetype6-dev zlib1g-dev // create these links, if already exists, remove it and re-link it # ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib # ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib # ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib // reinstall PIL # pip uninstall PIL # pip install PIL