社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

centos6.5 64位安装python的pil问题

jerry_hao • 11 年前 • 6293 次点击  

[root@localhost Imaging-1.1.6]# python setup.py build_ext -i running build_ext

PIL 1.1.6 BUILD SUMMARY

version 1.1.6 platform linux2 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

*** TKINTER support not available --- JPEG support ok --- ZLIB (PNG/ZIP) support ok --- FREETYPE2 support ok

但是 [root@localhost Imaging-1.1.6]# python selftest.py

Failure in example: _info(Image.open("Images/lena.jpg")) from line #24 of selftest.testimage Exception raised: Traceback (most recent call last): File "./doctest.py", line 499, in _run_examples_inner exec compile(source, "<string>", "single") in globs File "<string>", line 1, in <module> File "./selftest.py", line 22, in _info im.load() File "PIL/ImageFile.py", line 180, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File "PIL/Image.py", line 375, in _getdecoder raise IOError("decoder %s not available" % decoder_name) IOError: decoder jpeg not available 1 items had failures: 1 of 57 in selftest.testimage Test Failed 1 failures. *** 1 tests of 57 failed. 还是报错 不知道怎么处理了

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/402
 
6293 次点击  
文章 [ 3 ]  |  最新文章 11 年前
45553764
Reply   •   1 楼
45553764    11 年前

先下载源码包, 需要安装gcc,和python-devel 等包需要更改几个参数 修改setup.py: TCL_ROOT = "/usr/lib64/" JPEG_ROOT = "/usr/lib64/" ZLIB_ROOT = "/usr/lib64/" TIFF_ROOT = "/usr/lib64/" FREETYPE_ROOT = "/usr/lib64/" LCMS_ROOT = "/usr/lib64/"

python setup.py install

jerry_hao
Reply   •   2 楼
jerry_hao    11 年前

我又重新重装了下,有几个库没安装明白,现在好了。也不是太明白哪里的问题

三画儿
Reply   •   3 楼
三画儿    11 年前

没在centos里试过
不过有个Pillow可以试试 zope替代pil的库