安装步骤

  1. 安装必需的包 sudo apt-get install python-dev libjpeg-dev libfreetype6-dev zlib1g-dev
  2. $ sudo ln -s /usr/lib/uname -i-linux-gnu/libfreetype.so /usr/lib/
    $ sudo ln -s /usr/lib/uname -i-linux-gnu/libjpeg.so /usr/lib/
    $ sudo ln -s /usr/lib/uname -i-linux-gnu/libz.so /usr/lib/
会出现找不到 libfreetype6 如下操作可以解决
cd /usr/include
ln -s freetype2 freetype
  1. pip install PIL --allow-external PIL --allow-unverified PIL

  2. 最后出现表示安装成功

    *** TKINTER support not available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    --- FREETYPE2 support available
    *** LITTLECMS support not available

参考

http://prateekvjoshi.com/2014/04/19/how-to-install-pil-on-ubuntu/


hqman
198 声望8 粉丝

引用和评论

0 条评论