PIL をインストール
まずはライブラリをインストール。
[paraches@centos python26]$ sudo yum install libjpeg-devel
[paraches@centos python26]$ wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz [paraches@centos python26]$ tar zxvf Imaging-1.1.7.tar.gz [paraches@centos python26]$ cd Imaging-1.1.7 [paraches@centos Imaging-1.1.7]$ ls BUILDME MANIFEST Scripts _imagingmath.c encode.c selftest.py CHANGES PIL Tk _imagingtk.c libImaging setup.py CONTENTS PIL.pth _imaging.c decode.c map.c Docs README _imagingcms.c display.c outline.c Images Sane _imagingft.c doctest.py path.c
setup.py でサクっとインストールできるよ!
[paraches@centos Imaging-1.1.7]$ python setup.py build [paraches@centos Imaging-1.1.7]$ sudo python setup.py install
無事終了。
せっかくだし最後にテストもしておこう!
[paraches@centos Imaging-1.1.7]$ python selftest.py -------------------------------------------------------------------- PIL 1.1.7 TEST SUMMARY -------------------------------------------------------------------- Python modules loaded from ./PIL Binary modules loaded from /usr/local/lib/python2.6/site-packages/PIL -------------------------------------------------------------------- *** PIL CORE support not installed *** TKINTER support not installed --- JPEG support ok --- ZLIB (PNG/ZIP) support ok *** FREETYPE2 support not installed *** LITTLECMS support not installed -------------------------------------------------------------------- Running selftest: --- 57 tests passed. [paraches@centos Imaging-1.1.7]$
OK!