PIL in Ubuntu 14.04

本文提供了一个详细的指南,教你如何在Ubuntu 14.04上安装Python Imaging Library (PIL)。文章首先介绍了确保安装所需的库的方法,然后提供了具体的步骤来解决安装过程中遇到的常见问题。

With pillow Replacing PIL it has no more been much Widely Used.

Still if in any cases you want to install PIL then here goes the tutorial if you failed trying installing pip via

pip install PIL

http://www.pythonware.com/products/pil/
python setup.py install

First make sure you have following libraries

sudo apt-get build-dep python-imaging sudo apt-get install libjpeg62 libjpeg62-dev

And try there installing via pip install PIL.

if it continues to fail, it can be due to PIL searching those libraries in a different path.

It turns out that the APT installations put the libraries under /usr/lib/x86_64-linux-gnu and PIL will search for them in /usr/lib/. So you have to create symlinks for PIL to see them.

Try to see if libjpeg and libz libs exist in /usr/lib/x86_64-linux-gnu and make a symlink this way

32-bit version

sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib/libz.so sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/libjpeg.so sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib/libfreetype.so

64-bit version

sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/libz.so sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/libfreetype.so

转:
http://www.knolworld.com/pil-in-ubuntu-14-04/

==============================================================

备注:在原文的基础上,删除了原文中(粗体+下划线)的操作.

其它参考:
http://askubuntu.com/questions/156484/how-do-i-install-python-imaging-library-pil

转载于:https://www.cnblogs.com/kylinfish/articles/4156962.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值