Python进阶(四十二)-windows 64位安装Pillow模块替换PIL模块
分享一下我的偶像大神的人工智能教程!http://blog.****.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
Python进阶(四十二)-windows 64位安装Pillow模块替换PIL模块
在利用Python做图像配准时,需要安装PIL(Python Image Lib)模块。而PIL官网提示信息为:“The current free version is PIL 1.1.7. This release supports Python 1.5.2 and newer, including 2.5 and 2.6. A version for 3.X will be released later.”。
即当前提供的PIL模块还不支持Python3。此时就需要使用其它模块来替换PIL模块。有人提供了非官方的64位库,叫做Pillow,下载下来,是个.whl 结尾的文件,这个其实就是python使用的一种压缩文件,后缀名改成zip,可以打开。这个需要用 pip 安装。
在dos中切换至pip文件夹,输入命令“pip install Pillow-4.1.0-cp35-none-win_amd64.whl”。
至此,Pillow模块安装完成。
在使用时,注意要用 ‘from PIL import Image’ 代替 ‘import Image’。
给我偶像的人工智能教程打call!http://blog.****.net/jiangjunshow