PIL最新版本为1。1。7,但是安装之后,一直莫名其妙提示如下错误:
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder zip not available
该错误是因为PIL在其路径中找不到libjpeg,故手动安装了libjpeg62,且设置了相关的路径,最后依然提示改错误,多次配置无果后,尝试了版本1。1。6
下载Python Imaging Library 1.1.6 Source Kit
解压:
tar -xvf Imaging-1.1.6.tar.gz
检测依赖库是否已安装:
sudo python setup.py build_ext -i
会有如下输出:
--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform linux2 2.4.3 (#2, Oct 6 2006, 07:52:30)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------
如果JPEG,ZLIB,FREETYPE2未安装(not support),则需要安装相关的工具库
sudo apt-get install libjpeg62 libjpeg62-dev libfreetype6 libfreetype6-dev
由于PIL设置了依赖库的检测路径,但是上述三个库安装的路径都不在该检测路径中,需要进行相关设置:
sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib/
重复上面检测,直到检测到JPEG,ZLIB,FREETYPE2等库都已安装,运行如下测试
sudo python selftest.py
直到得到如下信息,即为配置成功:
57 tests passed.
分享到:
相关推荐
Python Imaging Library (PIL) Document from New Mexico Tech.Describes an image-processing library for the Python programming language.
一个简单的图像处理脚本示例,它使用Python的PIL(Python Imaging Library,也称为Pillow)库来进行基本的图像处理操作,如读取图像、转换为灰度图、调整大小、保存图像等。 在运行此脚本之前,请确保你已经安装了...
Python-Imaging-Library中文手册、PIL中文手册、python图像处理
Python Imaging Library中文手册、PIL中文手册、python图像处理
这是PIL的官方手册,2005年5月6日发布。这个版本涵盖 PIL 1.1.5的全部内容。介绍图形的各种变换及模块,方法,函数的使用。
In this book, author Fredrik Lundh, creator of the Python Imaging Library (PIL), delivers tested, accurate documentation of all the modules in the Python Standard Library, along with over 300 ...
此代码使用 Python Imaging Library(PIL) 模块实现空间域数字水印 该代码采用图像输入,该图像已命名为“1.jpg”。当您运行此代码时,在保存代码的文件夹中保留一个名为“1.jpg”的图像,它将生成一个新的图像“2....
Pillow是Python Imaging Library或PIL的友好分支,该库为Python解释器添加了图像处理功能。 为什么要转向枕头? 除了提供广泛的文件格式支持,高效的内部表示以及相当强大的图像处理功能之外,Pillow还与setuptools...
Python Imaging Library Overview
由于生成 qrcode 图片需要依赖 Python 的图像库,所以需要先安装 Python 图像库 PIL(Python Imaging Library),不然会遇到 “ImportError: No module named Image” 的错误: 复制代码 代码如下: sudo
使用Python Imaging Library(PIL)来处理图像的RGB值的python代码该代码是有关使用Thorlabs DCx(UC480)单色传感器提取微观元素的特征的研究论文的早期原型。 1-program.py:是将4张照片合并在一起的python代码...
PIL:Python Imaging Library,已经是Python平台事实上的图像处理标准库了。PIL功能非常强大,但API却非常简单易用。 由于PIL仅支持到Python 2.7,加上年久失修,于是一群志愿者在PIL的基础上创建了兼容的版本,名字...
PIL(Python Imaging Library) v4l2capture wave Internet connection gntp wolframalpha linux依赖包 growl for linux pico2wave sudo apt-get install espeak 如何使用 启动gol(growl on linux) 我编译安装之后路径...
Pillow 由 PIL(Python Imaging Library)的分支工程开发而来。由于 PIL 已经停止开发及维护,所以如今Pillow 成为了主流。它支持 JPEG、PNG、GIF、BMP 等多种图像格式。本书使用的是 Pillow 的2.6.1 版本。
The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics ...
PIL(Python Imaging Library)是Python一个强大方便的图像处理库,名气也比较大。不过只支持到Python 2.7。 PIL官方网站:http://www.pythonware.com/products/pil/ Pillow是PIL的一个派生分支,但如今已经发展成为比...
今天学习Python的时候,需要安装一个第三方库,Python Imaging Library,是Python下面一个非常强大的处理图像的工具库,不过PIL目前只支持到Python2.7版本。 Pillow是PIL的一个派生分之,目前的最新版本是3.0 安装...
PIL是Python Imaging Library简称,用于处理图片。PIL中已经有图片高斯模糊处理类,但有个bug(目前最新的1.1.7bug还存在),就是模糊半径写死的是2,不能设置。在源码ImageFilter.py的第160行: 所以,我们在这里...
PIL: Python Imaging Library,是python的图像处理库。由于PIL不兼容setuptools,再加上更新缓慢等因素,Alex Clark等一些社区好心人还是希望能够继续支持PIL,所以fork了PIL,这就是Pillow的缘起。 Pillow的目标 ...