来自PIL setup.py构建的一些背景知识:
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
这是在Ubuntu 9.04上安装的.
我只需要PIL来启用Django上传和调整各种图像(不同格式)的大小.不幸的是,它目前无法处理JPEG.在执行PIL的selftest.py之后,它想出了这个:
*** The _imaging C module is not installed
Run Code Online (Sandbox Code Playgroud)
我尝试使用python -v解释器导入Image和_imaging(两者都有效)...
>>> from PIL import Image
import PIL # directory PIL
# PIL/__init__.pyc matches PIL/__init__.py
import PIL # precompiled from PIL/__init__.pyc
# PIL/Image.pyc …Run Code Online (Sandbox Code Playgroud)