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. 认识与设计Serverless(二)

    一.设计Serverless的功能模块 第一节讲了Serverless一些概念与特性,废话居多,概念的东西了解过后要有设计与构思,才能学到精髓,一个Serverless平台的形成,涉及到很多模块的架构 ...

  2. IP地址与子网掩码的计算

    128.0.0.0=1 192.0.0.0=2224.0.0.0=3 240.0.0.0=4 248.0.0.0=5 252.0.0.0=6 254.0.0.0=7 255.0.0.0=8255.12 ...

  3. 2. Add Two Numbers(2个链表相加)

    You are given two non-empty linked lists representing two non-negative integers. The digits are stor ...

  4. JS事件监听手机屏幕触摸事件 Touch

    JS移动客户端--触屏滑动事件 移动端触屏滑动的效果其实就是图片轮播,在PC的页面上很好实现,绑定click和mouseover等事件来完成.但是在移动设备上,要实现这种轮播的效果,就需要用到核心的t ...

  5. kali linux 安装过程

    kali linux 安装过程 获取镜像文件 首先需要去官网获取kali linux的镜像文件,本来获取了kali的最新版,由于有些方面还没有得到完善,与VM还没有完全兼容,所以换了视频上的1.0.8 ...

  6. STRIDE 和 DREAD

    目录 STRIDE 和 DREAD 背景 STRIDE DREAD 注释 STRIDE 和 DREAD 背景 STRIDE 和 DREAD 是最常用也是最好用的安全模型 STRIDE 主要负责对安全风 ...

  7. ubuntu 18.04 64bit如何安装GPU版本tensorflow

    注:笔者的ubuntu18.04 64bit已经安装好了显卡驱动,因此没有此步操作 1.获取cuda(https://developer.nvidia.com/cuda-downloads,选择ubu ...

  8. sql批处理(batch)的简单使用

    批处理指的是一次操作中执行多条SQL语句,相比于一次一次执行效率会提高很多 批处理主要是分两步: 将要执行的SQL语句保存 执行SQL语句 Statement和PreparedStatement都支持 ...

  9. Ubuntu server 禁止显示器休眠

    Linux不让显示器休眠的方法 # setterm -blank # setterm -blank n (n为等待时间)

  10. thinkphp3.2笔记(3)视图渲染 模板的赋值与显示 系统变量

    一  视图 1  视图渲染 渲染模板输出最常用的是使用display方法,调用格式:display('[模板文件]'[,'字符编码'][,'输出类型'])模板文件的写法支持下面几种:用法 描述不带任何 ...