zoukankan      html  css  js  c++  java
  • decoder zip not available

    OpenERP在打印销售报价单时报错"decoder zip not available",Google后发现是PIL安装有问题。

    原先的安装方法:

    $ wget http://effbot.org/media/downloads/PIL-1.1.7.tar.gz 
    $ tar zxvf PIL-1.1.7.tar.gz
    $ cd PIL-1.1.7
    $ python setup.py install

    问题根源在于安装时没有检测到必要的依赖库(JPEG,ZLIB和FREETYPE):

    $ python setup.py build_ext -i
    --------------------------------------------------------------------
    PIL 1.1.7 SETUP SUMMARY
    --------------------------------------------------------------------
    version       1.1.7
    platform      linux2 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
                  [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
    --------------------------------------------------------------------
    *** TKINTER support not available
    *** JPEG support not available
    *** ZLIB (PNG/ZIP) support not available
    *** FREETYPE2 support not available
    *** LITTLECMS support not available
    --------------------------------------------------------------------

    安装依赖库(CentOS 6.4 64bit):

    $ yum install libjpeg-turbo-devel
    $ yum install zlib-devel
    $ yum install freetype-devel
    $ yum install lcms-devel

    重新安装PIL:

    $ python setup.py install

    参考:

    1. 64位centos下安装python的PIL模块

    2. 安装PIL(Python Imaging Library)

  • 相关阅读:
    自己总结的Java归并排序代码
    SpringDataJpa
    多态
    向上转型向下转型
    python面向对象装饰器
    Apache
    git
    μWSGI
    虚拟环境
    软件仓库(持续更新中)
  • 原文地址:https://www.cnblogs.com/eastson/p/3133813.html
Copyright © 2011-2022 走看看