python2.x及以下用的是PIL(图像处理库是 PIL(Python Image Library)),最新版本是 1.1.7  可在http://www.pythonware.com/products/pil/index.htm 下载和学习。

不过从该网站可看出它不支持python3.x

Pillow由PIL而来(支持3.x),所以该导入该库使用import PIL

由于本人用的是python 3.4 所以下载的Pillow

关于下载第三方库,有三种方法,之前用的都是

第一种方法

  1 下载第三方包,解压

  2 在命令提示符里输入cmd,然后用cd进入到第三方包的路径下

  3 输入python setup.py build

  4 输入python setup.py install

效率低下

故这次打算安装pip和easy_installer工具,通过代码就可以安装,

安装可参考:http://heipark.iteye.com/blog/1916758 或者http://blog.chinaunix.net/uid-12014716-id-3859827.html(内有官网地址)

除此之外在相应的官网也提供详细的安装教程(Mac OS的话真是快很多)

easy_installer简便安装:

Windows (simplified) (官网说明)

For Windows without PowerShell 3 or for installation without a command-line, download ez_setup.py using your preferred web browser or other technique and “run” that file.

保存本地后运行就在安装了,

pip安装 法1:下载解压,cd切换到pip的目录,找到setup.py文件,然后输入python setup.py install

最后显示

Installed d:\python34\lib\site-packages\pip-7.1.2
Processing dependencies for pip==7.1.2
Finished processing dependencies for pip==7.1.2

法2(推荐):安装完easy_install 后就可以执行这样的命令了

C:\Users\Administrator>easy_install pip
Searching for pip
Best match: pip 7.1.
Processing pip-7.1.-py3..egg
pip 7.1. is already the active version in easy-install.pth
Installing pip-script.py script to D:\python34\Scripts
Installing pip.exe script to D:\python34\Scripts
Installing pip.exe.manifest script to D:\python34\Scripts
Installing pip3-script.py script to D:\python34\Scripts
Installing pip3.exe script to D:\python34\Scripts
Installing pip3.exe.manifest script to D:\python34\Scripts
Installing pip3.-script.py script to D:\python34\Scripts
Installing pip3..exe script to D:\python34\Scripts
Installing pip3..exe.manifest script to D:\python34\Scripts Using d:\python34\lib\site-packages\pip-7.1.-py3..egg
Processing dependencies for pip
Finished processing dependencies for pip

那么接下来就是pip的使用(可参考http://www.th7.cn/Program/Python/201410/289949.shtml)

C:\Users\Administrator>pip install Pillow
Collecting Pillow
Downloading Pillow-2.9.0-cp34-none-win32.whl (1.2MB)
100% |████████████████████████████████|
Installing collected packages: Pillow
Successfully installed Pillow-2.9.0

那么pillow就安装成功了

在Pillow的官网教程也有教程http://pillow.readthedocs.org/installation.html 多种安装方式可参考

接下来

C:\Users\Administrator>python
Python 3.4.2 (v3.4.2:ab2c023a9
Type "help", "copyright", "cre
>>> 2
2
>>> from PIL import Image
>>>

没报错,说明安装成功

接下来可在http://pillow.readthedocs.org/index.html开始学习,或参考他人blog 后面将继续出图像处理的例子~

python 图像处理(从安装Pillow开始)的更多相关文章

  1. Python图像处理库:Pillow 初级教程

    Python图像处理库:Pillow 初级教程 2014-09-14 翻译 http://pillow.readthedocs.org/en/latest/handbook/tutorial.html ...

  2. Windows下Python中pip安装Pillow报错总结(转载)

    遇到的俩种错误1.ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting 问题原因 ...

  3. Python验证码识别 安装Pillow、tesseract-ocr与pytesseract模块的安装以及错误解决

    1.安装Pillow pip install Pillow 2.安装tesseract-ocr OCR(Optical Character Recognition, 光学字符识别) 软件 安装包含两个 ...

  4. Python图像处理库:Pillow 初级教程-乾颐堂

    Image类 Pillow中最重要的类就是Image,该类存在于同名的模块中.可以通过以下几种方式实例化:从文件中读取图片,处理其他图片得到,或者直接创建一个图片. 使用Image模块中的open函数 ...

  5. python3.4.2 安装Pillow

    Python 3.x 安装Pillow给Python安装Pillow非常简单,使用pip或easy_install只要一行代码即可.在命令行使用PIP安装: pip install Pillow或在命 ...

  6. 安装python的第三方库pillow

    参考:http://jingyan.baidu.com/article/ff42efa929e6c8c19f220254.html 用Python做图像处理时,需要用到PIL(图像处理库).但是PIL ...

  7. 图像处理基本工具——Python 环境下的 Pillow( PIL )

    由于笔者近期的研究课题与图像后处理有关,需要通过图像处理工具对图像进行变换和处理,进而生成合适的训练图像数据.该系列文章即主要记录笔者在不同的环境下进行图像处理时常用的工具和库.在 Python 环境 ...

  8. python 安装pillow

    安装 警告 Pillow >= 2.1.0 不支持 “import _imaging”.请使用 “from PIL.Image import core as _imaging” 代替. 警告 P ...

  9. python安装pillow模块错误

    安装的一些简单步骤就不介绍了,可以去搜索一下,主要就记录下我在安装pillow这一模块遇到的问题 1:安装好pillow后,安装过程没有出错 2:但是在python的IDLE输入from PIL im ...

随机推荐

  1. 2.Dubbo2.5.3注册中心和监控中心部署

    转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.注册中心Zookeeper安装 (1)搭建要求 zk服务器集群规模不小于3个节点要求各服务器之间系统时间要 ...

  2. java几个easy出错的小程序

    把基本知识过了一遍,发现了几个自己easy 出错的小程序,记录下来.. .. 1.关于try-catch异常 2,JAVA中的自省机制 3.有继承关系的类中静态函数 1,关于try-catch异常 p ...

  3. JS播放声音

    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JS播放声音</tit ...

  4. oracle查询2G以上的表

    SELECT a.*, b.comments  FROM (SELECT OWNER,               SEGMENT_NAME,               SEGMENT_TYPE,  ...

  5. Python2.7-Queue

    Queue 模块,python3中为queue,一般和threading模块同时使用,用于处理多任务队列,模块定义了3种队列类,先进先出(FIFO),后进先出(LIFO),优先级队列 Queue.Qu ...

  6. jstl 使用

    1.需要导入: 1)jstl.jar   2)standard.jar 引入:jsp相应的核心库:<%@taglib prefix="c" uri="http:// ...

  7. neo4j----创建索引

    创建索引 create index on:Student(name) 删除索引 drop index on:Student(name) 创建唯一索引 create constraint on (s:T ...

  8. Base64Util 工具类

    package com.org.utils; import java.io.ByteArrayOutputStream; public class Base64Util { private stati ...

  9. iscsi target IET架构

    IET(iSCSI Enterprise Target)是内核态实现的iscsi target,相比于用户态实现的target(比如tgt),iet比较稳定,并且也算是历史悠久,io都直接经过内核态, ...

  10. SqlServer执行大的数据库脚本出错解决方法

    如果执行线上项目拷下来sqlserver的.sql的数据库脚本文件,如果文件较大时,那么就会报错内存不足之类的. 这时可以在命令提示符使用命令来执行脚本文件.切记,执行前先改一下数据库存放位置! 命令 ...