python PIL下的各类问题

为了实现验证码的功能,使用了PIL。结果出现各类问题:ubuntu

先是"ImportError: The _imagingft C module is not installed",google了很长时间,在公司windows下不知怎么卸载又安装PIL竟然好了,但殊不知道到底怎么回事,稀里糊涂的验证码就能够出来了。晚上在家里ubuntu下,搞了很长时间终于算是弄好了。windows

最终的解决方案仍是,不用PIL了。使用pillow。同时解决了“ioerror encoder zip not available”google

pillow的使用方式有所变化:spa

Pillow is a fork of PIL that is compatible with pip/setuptools and gets a little better maintenance. I haven't seen any API differences yet.

Edit: There is one notable API difference. PIL exposes Image as a top-level namespace, so you can

import Image # in PIL only

but

from PIL import Image  # in pillow or PIL

 

参考自:http://stackoverflow.com/questions/3544155/about-the-pil-error-ioerror-decoder-zip-not-availablecode

相关文章
相关标签/搜索