简体   繁体   English

使用Centos 7和Python 3.4的PIL

[英]PIL with Centos 7 and Python 3.4

Does anyone have a working implementation of PIL with Centos 7 and Python 3.4? 有人在Centos 7和Python 3.4上有有效的PIL实现吗?

I tried to install the tarball from here, but when running "make" or "make test" got a lot of errors. 我尝试从此处安装tarball ,但是在运行“ make”或“ make test”时遇到很多错误。

If anyone has a working implementation, could you please post the commands and configuration needed ie yum packages to get it to work? 如果有人有可行的实现,请您发布所需的命令和配置(例如ie yum packages使其ie yum packages

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 : 这是我尝试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

Make sure you install the dependencies first, and then reinstall Pillow. 确保首先安装依赖项,然后重新安装Pillow。 Looks like you're missing libjpeg. 似乎您缺少libjpeg。 See here for details. 有关详细信息,请参见此处。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM