原本是想安装Image包,但是百度的方法都乱七八糟的不能用,最后是参考这篇文章的方法安装PIL的,Image是PIL的一个模块。
方法非常简单,两个步骤:
安装相应的库和包:
sudo apt-get build-dep python-imaging
ubuntu14.04中libfreetype 的头文件在目录/usr/include/freetype2下,但PIL中使用的路径是freetype,所以将原来的目录链接到新建的freetype:
cd /usr/include sudo ln -s freetype2 freetype
最后忍不住想吐槽百度简直是程序员的噩梦,这么简单的问题都找不到好答案