PIL/Pillow IOError: decoder jpeg not available
If you run into IOError: decoder jpeg not available
when trying to use PIL or Pillow you can generally resolve this by uninstalling PIL/Pillow and then installing libjpeg-dev, finally reinstalling PIL/Pillow
Debian/Ubuntu
-
pip uninstall Pillow
orpip uninstall PIL
sudo apt-get install libjpeg-dev
pip install Pillow
Redhat/CentOS
-
pip uninstall Pillow
orpip uninstall PIL
sudo yum install libjpeg-devel
pip install Pillow
Written by Thomas Schultz
Related protips
2 Responses
If you're doing this on a production server be sure to restart the app server or you'll not see if this has fixed your issue!
over 1 year ago
·
@timfletcher: Reload is enough, don't need to restart the apache/nginx.
Btw, for Centos 7 :
yum install libjpeg-turbo-devel
Thanks for the article.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#