0

我在 linux mint 64 上安装了带有 python2.7 的 PIL1.2。我已经运行了python setup.py build_ext -i. 我得到了以下信息。

running build_ext
--------------------------------------------------------------------
PIL 1.2a0 SETUP SUMMARY
--------------------------------------------------------------------
version       1.2a0
platform      Python 2.7.3 (default, Apr 10 2013, 05:13:16)
              [GCC 4.7.2] on linux2
--------------------------------------------------------------------
*** TKINTER support not available (Tcl/Tk 8.5 libraries needed) 
--- JPEG support available
*** WEBP support not available 
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.

*但是当我跑的时候python selftest.py。我收到jpg错误 *

'--------------------------------------------------------------------
PIL 1.2a0 TEST SUMMARY 
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
*** TKINTER support not installed
*** JPEG support not installed
*** WEBP support not installed
*** ZLIB (PNG/ZIP) support not installed
--- FREETYPE2 support ok
--- LITTLECMS support ok
--------------------------------------------------------------------
Running selftest:
**********************************************************************
File "./selftest.py", line 50, in selftest.testimage
Failed example:
    try:
     _info(Image.open(os.path.join(ROOT, "Images/lena.jpg")))
    except IOError:
     pass
Expected:
    ('JPEG', 'RGB', (128, 128))
Got nothing
**********************************************************************
1 items had failures:
   1 of  58 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 58 failed.

为什么它不能通过测试
顺便说一下PIL1.7.1可以在我的电脑上工作。但 II 无法转换YcbCrnumpy.array. 他们说version1.2已经修复了这个bug

4

1 回答 1

0

我已经解决了这个问题

aptitude search  python_pip
pip uninstall PIL
pip install pillow
于 2013-09-04T04:59:20.273 回答