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. 关于MVC开发时,无法找到area的问题记录

    解决方法: 检查area=admin 的dll是否生成,一般都是admin域生成dll导致

  2. div+css ie6图片之间有间隙的问题

    图片转换为快级元素就解决了 img{display:block;} 也可设置img属性img{vertical-align:top;}

  3. 1、爬虫简介与request模块

    一 爬虫简介 概述 近年来,随着网络应用的逐渐扩展和深入,如何高效的获取网上数据成为了无数公司和个人的追求,在大数据时代,谁掌握了更多的数据,谁就可以获得更高的利益,而网络爬虫是其中最为常用的一种从网 ...

  4. BZOJ 1087 互不侵犯King 状态压缩DP

    题目链接: https://www.lydsy.com/JudgeOnline/problem.php?id=1087 题目大意; 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案.国 ...

  5. 在openresty或nginx编译nginx-upsync-module&nginx_upstream_check_module

    针对我在编译在两个模块的过程中遇到的一系列问题,特此记录编译流程的一些细节 1.下载 install git git clone https://github.com/weibocom/nginx-u ...

  6. jqgrid 使用自带的行编辑

    上篇jqgrid 单击行启用行编辑,切换行保存原编辑行 本篇,说说使用jqgrid自带的行编辑 1)设置需要编辑的列  editable: true colModel: [ { label: '字段编 ...

  7. 大数据入门第十四天——Hbase详解(一)入门与安装配置

    一.概述 1.什么是Hbase 根据官网:https://hbase.apache.org/ Apache HBase™ is the Hadoop database, a distributed, ...

  8. Java基础—面向对象

    一.什么叫面向对象 万物皆对象(待更正) 二.面向对象三大特征 抽象:把一类对象共同特征进行抽取构造类的过程,包括两种抽象:第一种是数据抽象,也就是对象的属性.第二种是过程抽象,也就是对象的行为 封装 ...

  9. 20155217《网络对抗》Exp07 网络欺诈防范

    20155217<网络对抗>Exp07 网络欺诈防范 实践内容 简单应用SET工具建立冒名网站 ettercap DNS spoof 结合应用两种技术,用DNS spoof引导特定访问到冒 ...

  10. Unused Method(不再使用的方法)——Dead Code(死亡代码)

        系列文章目录:     使用Fortify进行代码静态分析(系列文章) Unused Method(不再使用的方法)    示例:  private bool checkLevel(strin ...