ubuntu安装图像处理库PIL
来源:互联网 发布:秦义绝捏脸中文数据 编辑:程序博客网 时间:2024/05/16 04:58
PIL(Python Image Library)图像处理库,是python中最常用的图像处理库,目前的版本是1.17。该库提供了基本的图像处理功能,例如改变图像改变大小、格式转换、色场空间转换、图像增强、直方图处理、生成二维码、插值和滤波等。
在安装PIL之前,需要安装依赖库:zlib, png, freetype, jpeg
依赖运行库的安装:这个库是不能用 apt-get安装的,因此需要自己编译安装
安装依赖库:zlib$:wget https://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz$:tar -zxvf zlib-1.2.8.tar.gz$:./configure --prefix=/usr/local/lib$:cd zlib-1.2.8$:make$:sudo make install 安装依赖库:png$:wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.21.tar.gz$:tar -zxvf libpng-1.6.21.tar.gz$:./configure --prefix=/usr/local/lib$:cd libpng-1.6.21$:make$:sudo make install安装依赖库:freetype$:wget https://sourceforge.net/projects/freetype/files/freetype2/2.6.3/freetype-2.6.3.tar.gz$:tar -zxvf freetype-2.6.3.tar-gz$:./configure --prefix=/usr/local/lib$:cd freetype-2.6.3$:make$:sudo make install安装依赖库:jpeg$:wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz$:tar -zxvf jpegsrc.v8c.tar.gz$:cd jpeg-8c$:./configure --prefix=/usr/local/lib$:make$:sudo make install
安装dev链接库
sudo apt-get install zlib1g-dev libpng12-dev libfreetype6-dev libjpeg8-dev
安装PIL库
$:wget wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz$:tar -zxvf Imaging-1.1.7$:cd Imageing-1.1.7修改setup.pyJPEG_ROOT = "/usr/local/lib"ZLIB_ROOT = "/usr/local/lib"FREETYPE_ROOT = "/usr/local/lib"检查系统环境是否配置成功:$:cd Imaging-1.1.7$:python setup.py build_ext -irunning build_ext--------------------------------------------------------------------PIL 1.1.7 SETUP SUMMARY--------------------------------------------------------------------version 1.1.7platform linux2 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]--------------------------------------------------------------------*** TKINTER support not available (Tcl/Tk 8.6 libraries needed)--- JPEG support available--- ZLIB (PNG/ZIP) support available--- FREETYPE2 support available*** LITTLECMS support not available--------------------------------------------------------------------To add a missing option, make sure you have the requiredlibrary, and set the corresponding ROOT variable in thesetup.py script.To check the build, run the selftest.py script.只要JPEG、ZLIB、FREETYPE2 是 available就行开始PIL的安装:$:python setup.py build(我出现的错误 <freetype/freetype> 不存在,处理方法:cd /usr/include sudo ln -s freetype2 freetype)$:python setup.py install
0 0
- ubuntu安装图像处理库PIL
- ubuntu 安装 PIL(Python图像库)
- Python图像处理库 PIL
- PIL python图像处理库
- Windows安装Python图像处理库:PIL模块
- Windows安装Python图像处理库:PIL模块
- Win7下安装Python图像处理库PIL
- ubuntu14.04安装python的图像处理库PIL
- 【转】Windows安装Python图像处理库:PIL模块
- Python安装第三方PIL图像处理库---Windows环境
- Win7 64位下Python安装PIL图像处理库
- Windows7下安装Python图像处理库PIL、pytesser
- Win7 64位下Python安装PIL图像处理库
- Win7 64位下Python安装PIL图像处理库
- Python安装PIL(图像处理类库)
- python使用PIL库做图像处理
- Python图像处理PIL库简介
- Python图像处理库PIL -- 学习资源
- 求职计划第一天
- 乘法逆元
- html通过css来设置半透明背景
- Android入门基础 Java基础学习笔记dya9 多态,抽象类和接口
- Java Servlet生成Json格式数据
- ubuntu安装图像处理库PIL
- RF结合Page Object模式web自动化测试架构
- 安卓杂乱基础
- eclipse出现 Intent cannot be resolved to a type解决方法。
- Android布局中的layout_weight和weightSum属性的详解及使用
- HDOJ 1233 还是畅通工程
- android下camera数据流的分析
- android Security Tips
- 【Usaco2015 JAN】Cow Rectangles