PIL用jpeg安装

时间:2013-09-04 02:18:04

标签: python python-imaging-library

我在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可以在我的电脑上运行。但我无法将YcbCr转换为numpy.array。他们说版本1.2修复了这个错误

1 个答案:

答案 0 :(得分:0)

我已经通过

解决了这个问题
aptitude search  python_pip
pip uninstall PIL
pip install pillow
相关问题