Scripts like that:
from PIL import Image, ImageOps
img = Image.open('1.JPG')
thumb = ImageOps.fit(img, (200,200) , Image.ANTIALIAS, (0.5, 0.5))
cause this IOError:
Traceback (most recent call last):
(...)
File "/Library/Python/2.7/site-packages/PIL/Image.py", line 385, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
How do I get jpeg support for my PIL? That issue seems to be well known but the existing threads don't solve it for me. I use brew and pip for my python packages and have already tried the following:
brew install jpeg
causes Error: jpeg-8d already installed
brew install libjpeg
causes Error: jpeg-8d already installed
sudo pip install Pillow
- installation works but does not change anythingHow do I get jpeg support for my PIL installation? Any ideas?
I don't understand why, but reinstalling PIL fixed the issue:
sudo pip uninstall pil
sudo pip install pil
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With