Python2.7.3+PIL 安装简记

######python 2.7.3####### wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 tar zxvf Python-2.7.3.tar.bz2 cd Python-2.7.3 ./configure –prefix=/usr/local/python2.7.3/ make && make install mv /usr/bin/python /usr/bin/python2.6.6 ln -s /usr/local/python2.7.3/bin/python /usr/bin/python #修改yum配置bin的Python调用模块 vim /usr/bin/yum #!/usr/bin/python2.6.6 ######PIL模块###### wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz tar zxvf Imaging-1.1.7.tar.gz cd Imaging-1.1.7 python setup.py build_ext -i #安装前先查看一下环境 如果出现如下提示 *** TKINTER support not available *** JPEG support not available *** ZLIB (PNG/ZIP) support not available *** FREETYPE2 support not available *** LITTLECMS support not available #因为很多库再之前安装环境的时候已经安装了,只是没有检测到 #修改setup.py #TCL_ROOT = “/usr/lib64” #JPEG_ROOT = “/usr/lib64” #ZLIB_ROOT = “/usr/lib64” #TIFF_ROOT = “/usr/lib64” #FREETYPE_ROOT = “/usr/lib64” #LCMS_ROOT = “/usr/lib64” python setup.py install