Python进阶(四十二)-windows 64位安装Pillow模块替换PIL模块
#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’。
文章来源: shq5785.blog.csdn.net,作者:No Silver Bullet,版权归原作者所有,如需转载,请联系作者。
原文链接:shq5785.blog.csdn.net/article/details/70244428
- 点赞
- 收藏
- 关注作者
评论(0)