python--安装PIL

PIL:Python Imaging Library,已是Python平台事实上的图像处理标准库了。PIL功能很是强大,但API却很是简单易用。python

安装PIL

在Debian/Ubuntu Linux下直接经过apt安装:sql

非官方的64位库:$ sudo apt-get install python-imaging


在windows平台要到PIL官网下载exe安装包,若是是64位系统安装时会报“Python version 2.7 required, which was not found in the registry”错误。

http://www.lfd.uci.edu/~gohlke/pythonlibs/windows

叫作Pillow,下载下来,是个 .whl 结尾的文件,这个其实就是python使用的一种压缩文件,后缀名改为zip,能够打开。ui

这个须要用 pip 安装。spa

pip install Pillow-3.3.1-cp27-cp27m-win_amd64.whl命令行

 

进python 命令行 code

from PIL import Image

OK,安装成功了。用法和PIL同样ip

相关文章
相关标签/搜索