1
geew OP 错误的单元测试结果如下:
[root@xxx Imaging-1.1.7]# python selftest.py -------------------------------------------------------------------- PIL 1.1.7 TEST SUMMARY -------------------------------------------------------------------- Python modules loaded from /usr/local/lib/python2.7/site-packages/PIL Binary modules loaded from /usr/local/lib/python2.7/site-packages/PIL -------------------------------------------------------------------- --- PIL CORE support ok *** TKINTER support not installed *** JPEG support not installed *** ZLIB (PNG/ZIP) support not installed *** FREETYPE2 support not installed *** LITTLECMS support not installed -------------------------------------------------------------------- Running selftest: ***************************************************************** Failure in example: try: _info(Image.open(os.path.join(ROOT, "Images/lena.jpg"))) except IOError, v: print v from line #24 of selftest.testimage Expected: ('JPEG', 'RGB', (128, 128)) Got: decoder jpeg not available 1 items had failures: 1 of 57 in selftest.testimage ***Test Failed*** 1 failures. *** 1 tests of 57 failed. |
2
geew OP 同一个机子上, 2.6的结果是对的, 所以应该不是缺少什么库的问题, 应该是库的加载的问题...但2.7会加载哪里的库?驱动?模块?
2.6执行结果: [root@xxx Imaging-1.1.7]# /usr/bin/python selftest.py -------------------------------------------------------------------- PIL 1.1.6 TEST SUMMARY -------------------------------------------------------------------- Python modules loaded from /usr/lib64/python2.6/site-packages/PIL Binary modules loaded from /usr/lib64/python2.6/site-packages/PIL -------------------------------------------------------------------- --- PIL CORE support ok *** TKINTER support not installed --- JPEG support ok --- ZLIB (PNG/ZIP) support ok --- FREETYPE2 support ok *** LITTLECMS support not installed -------------------------------------------------------------------- Running selftest: --- 57 tests passed. |
3
geew OP 在stackoverflow整理了各种资料, 有谁遇到这个问题的话去看看吧:
http://stackoverflow.com/questions/18504835/pil-decoder-jpeg-not-available-on-ubuntu-x64/20091508#20091508 |