背景从PIL setup.py建立一个位:PIL不会导入_imaging C模块中:“***的_imaging C模块中未安装”
--------------------------------------------------------------------
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
--------------------------------------------------------------------
这是的Ubuntu 9.04安装。
我只需要PIL就可以让Django上传和调整各种不同格式的图像。不幸的是,它目前不能处理JPEG。执行PIL的selftest.py后,想出了这个:
*** The _imaging C module is not installed
我试图导入图像,并使用Python解释器-v(两者合作)_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 matches PIL/Image.py
import PIL.Image # precompiled from PIL/Image.pyc
[继续成功相当长的一段]
>>> import _imaging
dlopen("/usr/local/lib/python2.6/dist-packages/PIL/_imaging.so", 2);
import _imaging # dynamically loaded from /usr/local/lib/python2.6/dist-packages/PIL/_imaging.so
使用Python解释器时,那么_imaging是可用的,但由于某种原因没有被进口在其他情况正常。
我一直在寻找这个问题的解决方案,在过去的几个小时,并没有任何接近找到一个。我错过了一些愚蠢明显的东西吗?或者有什么想法,为什么它不工作?
在此先感谢!
另外:我知道http://effbot.org/zone/pil-imaging-not-installed.htm,但只是演示错误,并没有提供解决方案。
编辑:我一直在窥探,看来导入_imagingmath是问题。我做了蟒蛇-vv selftest.py看到它被打破了,这是怎么回事:
dlopen("/usr/local/lib/python2.6/dist-packages/PIL/_imagingmath.so", 2);
import _imagingmath # dynamically loaded from /usr/local/lib/python2.6/dist-packages/PIL/_imagingmath.so
*** The _imaging C module is not installed
# clear __builtin__._
[etc. etc. etc.]
这给我的错误:“E:找不到包的libjpeg”。我确实已经安装了libjpeg62 - 是否相当于? – 2010-11-06 13:03:45
你有libjpeg62-devel吗? – 2010-11-06 13:25:16
不,我有libjpeg62和libjpeg62-dev。 – 2010-11-06 13:31:05