我在 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 无法转换YcbCr
为numpy.array
. 他们说version1.2已经修复了这个bug