freetype wget http:///projects/freetype/files/latest/download?source=dlp jpeg wget http://www./files/jpegsrc.v7.tar.gz # import _imaging : No module named _imaging # 需要先安装jpeg库 wget http://www./files/jpegsrc.v7.tar.gz tar -zxvf jpegsrc.v7.tar.gz cd jpeg-7 CC="gcc -arch x86_64" ./configure --enable-shared --enable-static make make install # 然后再安装PIL库 wget http:///downloads/Imaging-1.1.6.tar.gz tar -zxvf Imaging-1.1.6.tar.gz cd Imaging-1.1.6 rm -rf build # 设置JPEG库的路径 vim setup.py : JPEG_ROOT = libinclude("/usr/local") python2.5 setup.py build python2.5 setup.py install # 把JPEG加入到系统库路径 echo '/usr/local/lib' >> /etc/ld.so.conf ldconfig # OK,完成 上述操作完成后就不会再报找不到 _imaging 的错误了。 别高兴太高,如果用到了freetype2,还会报_imagingft找不到。解决办法类 似,先安装freetype2,在安装PIL里指定freetype2路径,将freetype2加到系 统库路径中即可。
|
|
来自: python_diango > 《centos5.8》