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

  1. sudo apt-get install libjpeg libjpeg-dev
  2. sudo apt-get install libfreetype6 libfreetype6-dev

download jpeg source

  1. tar -xzvf jpegsrc.v8c.tar.gz
  2. cd jpeg-6b/
  3. ./configure
  4. make
  5. sudo make install

So download Python Imaging Library 1.1.7 Source Kit (all platforms)

The after run the setup.py install, check if the support was ok

  1. --------------------------------------------------------------------
  2. *** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
  3. --- JPEG support available
  4. --- ZLIB (PNG/ZIP) support available
  5. *** FREETYPE2 support not available
  6. --- LITTLECMS support available
  7. --------------------------------------------------------------------

If not, in setup.py in PIL I had to change the path of :

  1. JPEG_ROOT = None
  2. ZLIB_ROOT = None

to

  1. JPEG_ROOT = libinclude("/usr/")
  2. ZLIB_ROOT = libinclude("/usr/")
 
 

Python PIL : 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. exceptions.IOError: decoder jpeg not available

    1.确保安装PIL所需的系统库 yum -y install zlib yum -y install  zlib-devel yum -y install libjpeg yum -y install ...

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

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

  4. Python,PIL压缩裁剪图片

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

  5. python PIL 图像处理操作

    python PIL 图像处理 # 导入Image库 import Image # 读取图片 im = Image.open("1234.jpg") # 显示图片 im.show( ...

  6. Python PIL

    Python PIL PIL (Python Image Library) 库是Python 语言的一个第三方库,PIL库支持图像存储.显示和处理,能够处理几乎所有格式的图片. 一.PIL库简介 1. ...

  7. Python PIL模块笔记

    利用python pil 实现给图片上添加文字 图片中添加文字#-*- coding: utf-8 -*- from PIL import Image,ImageDraw,ImageFont ttfo ...

  8. python PIL 图像处理

    python PIL 图像处理 This blog is from: https://www.jianshu.com/p/e8d058767dfa Image读出来的是PIL的类型,而skimage. ...

  9. < python PIL - 批量图像处理 - 生成自定义大小图像 >

    < python PIL - 批量图像处理 - 生成自定义大小图像 > 直接用python自带的PIL图像库,对一个文件夹下所有jpg/png的图像进行自定义像素变换 from PIL i ...

随机推荐

  1. (转)通过HTTP RESTful API 操作elasticsearch搜索数据

    样例数据集 这是编造的JSON格式银行客户账号信息文档,文档schema如下: { “account_number”: 0, “balance”: 16623, “firstname”: “Brads ...

  2. [华为]查找两个字符串a,b中的最长公共子

    链接:https://www.nowcoder.com/questionTerminal/181a1a71c7574266ad07f9739f791506来源:牛客网 查找两个字符串a,b中的最长公共 ...

  3. python的构建工具setup.py

    一.构建工具setup.py的应用场景 在安装python的相关模块和库时,我们一般使用“pip install  模块名”或者“python setup.py install”,前者是在线安装,会安 ...

  4. 什么是Java泛型?

    ①为什么要使用泛型? 引入例子 public class GenericTest { public static void main(String[] args) { List list = new ...

  5. DB杂记

    1. mybatits 批量插入: <insert id="insertColumnitem2"> INSERT INTO REPORT_COLUMNITEM (COL ...

  6. 学习Zookeeper之第1章Zookeeper入门

    第 1 章 Zookeeper入门 1.1 概述 1.2 特点 1.3 数据结构 1.4 应用场景 统一命名服务 统一配置管理 统一集群管理 服务器动态上下线 软负载均衡 1.5 下载地址 第 1 章 ...

  7. Firefox管理已经保存的账号和密码

    https://support.mozilla.org/en-US/kb/password-manager-remember-delete-change-and-import You can easi ...

  8. 一种不太合规的PreparedStatement使用方式

    这是一种不太合规的PreparedStatement调用使用方式 , 没有让Dao单独执行它单纯的任务. AccountDao.java package heartl_jdbc; /** * 银行操作 ...

  9. 嵌入式Linux应用程序开发环境搭建记录

    2016年2月 参考资料: OK210软件手册(Linux版).pdf Ubuntu下Qt4.7.1编译环境配置说明.pdf 我阅读了以下内容: OK210软件手册(Linux版).pdf 第七章 O ...

  10. 如何创建.babelrc文件?

    方法一: 根目录下,创建  .babelrc.  文件名就可以了! 方法二: git进入根目录,输入   type>.babelrc  ,回车即可!