Bonjour,
J'ai besoin de la librairie "PIL (Python Imaging Library).
L'installation par YUM ne me convient pas car elle ne contient pas le support des images.
J'ai donc du me tourner vers une installation hors yum.
J'ai telecharge PIL sur
http://www.pythonware.com/products/pil/index.htm
et j'ai pris la dernière version : Python Imaging Library 1.1.7 Source Kit (all platforms) (November 15, 2009).
J'ai trouve sur
http://wiki.mediatemple.net/w/CentOS_5.5_%28VE%29_Server_Build_-_Django_1.3,_Python_2.7
J'ai aussi installe les paquets manquants:
# yum install zlib zlib-devel
# yum install libjpeg libjpeg-devel
# yum install freetype freetype-devel
[root@localhost Imaging-1.1.7]# yum list zlib zlib-devel libjpeg libjpeg-devel freetype freetype-devel
Modules complémentaires chargés : langpacks, presto, refresh-packagekit
Paquets installés
freetype.x86_64 2.4.4-7.fc15 @updates
freetype-devel.x86_64 2.4.4-7.fc15 @updates
zlib.i686 1.2.5-6.fc15 @updates
zlib.x86_64 1.2.5-6.fc15 @updates
zlib-devel.x86_64 1.2.5-6.fc15 @updates
Lorsque j'execute l'installation dans python : python setup.py build_ext -i
il me dit
[root@localhost Imaging-1.1.7]# python setup.py build_ext -i
running build_ext
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.1 (r271:86832, Apr 12 2011, 16:15:16)
[GCC 4.6.0 20110331 (Red Hat 4.6.0-2)]
--------------------------------------------------------------------
*** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not 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.
mais lorsque je veux tester avec selftest, voici ce qu'il me dit
[root@localhost Imaging-1.1.7]# python selftest.py
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
*** TKINTER support not installed
*** JPEG support not installed
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest:
*****************************************************************
Failure in example:
try:
_info(Image.open(os.path.join(ROOT, "Images/lena.jpg")))
except IOError, v:
print v
from line #24 of selftest.testimage
Expected: ('JPEG', 'RGB', (128, 128))
Got: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.
Donc je ne peux pas l'installer puisque le test n'est pas bon.
Quelqu'un a-t'il une idée pourquoi, le système me dit qu'il est bon au build et pas au test !
et si possible comment résoudre le problème.
Merci