1.确保安装PIL所需的系统库

yum -y install zlib

yum -y install  zlib-devel

yum -y install libjpeg

yum -y install  libjpeg-devel

yum -y install freetype

yum -y install  freetype-devel

2.下载Imaging-1.1.7.tar.gz并解压

3.安装

cd Imaging-1.1.7

python setup.py build_ext -i

确保

--------------------------------------------------------------------
    PIL 1.1.7 SETUP SUMMARY
    --------------------------------------------------------------------
    version       1.1.7
    platform      linux2 2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
                  [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
    --------------------------------------------------------------------
    *** TKINTER support not available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    --- FREETYPE2 support available
    *** LITTLECMS support not available
    --------------------------------------------------------------------

4.修改setup.py

TCL_ROOT = "/usr/lib64/"

JPEG_ROOT = "/usr/lib64/"

ZLIB_ROOT = "/usr/lib64/"

TIFF_ROOT = "/usr/lib64/"

FREETYPE_ROOT = "/usr/lib64/"

LCMS_ROOT = "/usr/lib64/"

5.install

python setup.py install

过程中会出现调用gcc进行编译的过程,如果没有这个过程,基本上就有问题。

6.如果之前安装有问题则需要删除PIL

cd  /opt/Python-2.7/lib/python2.7/site-packages

rm -rf PIL

rm -rf PIL.pth

exceptions.IOError: decoder jpeg not available的更多相关文章

  1. python PIL except: IOError: decoder jpeg not available

    今天在Python运行环境的服务器弄一个有关图像处理的程序时报这样的错: 1 NameError: global name 'Image' is not defined import Image 了下 ...

  2. Python PIL : IOError: decoder jpeg not available

    The first thing I check when I got this error was to check if libjpeg was installed. Lets try this s ...

  3. ubuntu14.04 安装PIL库出现OError: decoder jpeg not available 的解决方案

    出现 OError: decoder jpeg not available 的原因是,没有装JPEG的库,同时要支持png图片的话还要装 ZLIB.FREETYPE2.LITTLECMS的库文件. 先 ...

  4. Odoo ParseError:"decoder jpeg not available" while parsing....

    The reason causing this problem is the plugin PIL install error to solve this problem,try this: 1. c ...

  5. docker 安装PIL python 报错 IOError: decoder zip not available

    按照网上得方法:安装依赖库:yum install freetype freetype-develyum install libjpeg libjpeg-develyum install zlib z ...

  6. PIL安装记录,编译支持jpeg png

    PIL是python理想的图片处理module,但是想要良好的支持各种图片,还需要检查一下几步,否则会提示:IOError: decoder jpeg not available之类的. 我的环境:L ...

  7. 关于python中PIL的安装

    python 的PIL安装是一件很蛋痛的事, 如果你要在python 中使用图型程序那怕只是将个图片从二进制流中存盘(例如使用Scrapy 爬网存图),那么都会使用到 PIL 这库,而这个库是出名的难 ...

  8. Python,PIL压缩裁剪图片

    自己写了用来压缩 DC 照片的,批量处理整目录文件,非常方便.需要安装 PIL #!/usr/bin/env python import Image import os import os.path ...

  9. shell手册--笨鸟杰作

    ==================================================================================================== ...

随机推荐

  1. Unix/Linux 脚本中 “set -e” 的作用

    ----------------------------------------------------------- #!/bin/bash set -e command 1 command 2 . ...

  2. [置顶] Java Web开发教程来袭

    Java Web,是用Java技术来解决相关web互联网领域的技术总和.web包括:web服务器和web客户端两部分.Java在客户端的应用有java applet不过现在使用的很少,Java在服务器 ...

  3. block代码块介绍

    关于block的简单介绍 什么是block? Block是C语言的一个语法特性,同时也是C语言的运行时特性,它很像C中的函数指针,因为你可以像使用函数指针一样的去使用block对象:它也很像C++中的 ...

  4. ProGuard详解

    综述 对于ProGuard工具想必我们都不陌生,它能够通过移除无用代码,使用简短无意义的名称来重命名类,字段和方法.从而能够达到压缩.优化和混淆代码的目的.最终我们会获取一个较小的apk文件,并且我们 ...

  5. Extending Robolectric

    Robolectric is a work in progress, and we welcome contributions from the community. We encourage dev ...

  6. Python之路【第十一篇】:CSS --暂无内容-待更新

    Python之路[第十一篇]:CSS --暂无内容-待更新

  7. git语言

    安装完成后,需要进一步设置用户名和email.因为git是分布式版本控制工具,因此需要每台开发机自报家门. $ git config --global user.name "Your Nam ...

  8. producer怎样发送消息到指定的partitions

    http://www.aboutyun.com/thread-9906-1-1.html http://my.oschina.net/u/591402/blog/152837 https://gith ...

  9. OBJECT和EMBED标签(转载)

    一.介绍: 我们要在网页中正常显示flash内容,那么页面中必须要有指定flash路径的标 签.也就是OBJECT和EMBED标签.OBJECT标签是用于windows平台的IE浏览器的,而EMBED ...

  10. Linq 调试

    void Main() { var MyMonitor = new Devart.Data.Oracle.OracleMonitor(); MyMonitor.IsActive = true; var ...