用jpeg进行PIL安装 [英] PIL install with jpeg

查看:67
本文介绍了用jpeg进行PIL安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux Mint 64上使用python2.7安装了PIL1.2. 我已经运行了python setup.py build_ext -i.我得到了以下信息.

I install PIL1.2 with python2.7 on linux mint 64. I have run python setup.py build_ext -i. And I got following infomations.

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错误*

*But when i ran python selftest.py. I got jpg error *

'--------------------------------------------------------------------
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.他们说version1.2已修复此错误

Why can't it pass the test
By the way PIL1.7.1 can work on my computer. But I I can't convert YcbCr to numpy.array. And They said version1.2 had fixed this bug

推荐答案

我已通过

aptitude search  python_pip
pip uninstall PIL
pip install pillow

这篇关于用jpeg进行PIL安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆