zoukankan      html  css  js  c++  java
  • python PIL下的各种问题

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

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

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

    pillow的使用方式有所变化:

    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-available

  • 相关阅读:
    网络编程
    GUI编程
    Java数组
    Day24
    Day23
    Day22
    Day21
    Day20
    Day19
    Day18
  • 原文地址:https://www.cnblogs.com/zeng-wei/p/3710463.html
Copyright © 2011-2022 走看看