Skip to content

Instantly share code, notes, and snippets.

@bydooweedoo
Created October 18, 2011 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bydooweedoo/1296458 to your computer and use it in GitHub Desktop.
Save bydooweedoo/1296458 to your computer and use it in GitHub Desktop.
Ubuntu - Enable jpeg support with PIL
Tested with ubuntu 11.04 (python 2.7)
If you have the following error by using PIL:
decoder jpeg not available
You may try:
sudo apt-get install libjpeg8 libjpeg8-dev libjpeg62 libjpeg62-dev
or:
sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
and then:
sudo pip install --upgrade PIL
And if failed:
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/
sudo pip install --upgrade PIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment