1

Does anyone have a working implementation of PIL with Centos 7 and Python 3.4?

I tried to install the tarball from here, but when running "make" or "make test" got a lot of errors.

If anyone has a working implementation, could you please post the commands and configuration needed i.e. yum packages to get it to work?

I also found this blog post but it didn't help.

Here is one error that I am seeing when trying to convert a jpeg's size:

Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "/var/www/deploy/myproject/myproject-django/venv/lib/python3.4/site-packages/PIL/Image.py", line 1557, in resize
    self.load()
  File "/var/www/deploy/myproject/myproject-django/venv/lib/python3.4/site-packages/PIL/ImageFile.py", line 203, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/var/www/deploy/myproject/myproject-django/venv/lib/python3.4/site-packages/PIL/Image.py", line 420, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
OSError: decoder jpeg not available
Aaron Lelevier
  • 19,850
  • 11
  • 76
  • 111
  • What are the build errors? Do you have the appropriate `python-devel` package installed? – Paul Rooney Nov 19 '15 at 22:38
  • @PaulRooney I added an error above when trying to run a common `PIL` method. I have `Package python-devel-2.7.5-18.el7_1.1.x86_64 already installed and latest version` and `Package python-pillow-2.0.0-17.gitd1c6db8.el7.x86_64 already installed and latest version`. So, I think that I am good there. I think that it is just Centos 7 + Python 3.4... – Aaron Lelevier Nov 19 '15 at 22:43
  • 1
    Try installing the `libjpeg-devel` package and then install pillow using pip3. If you don't have pip3 look [here](http://stackoverflow.com/questions/32618686/how-to-install-pip-in-centos-7) – Paul Rooney Nov 19 '15 at 23:18

1 Answers1

1

Make sure you install the dependencies first, and then reinstall Pillow. Looks like you're missing libjpeg. See here for details.

http://pillow.readthedocs.org/en/3.0.x/installation.html

Hugo
  • 27,885
  • 8
  • 82
  • 98