Install PIL with Jpeg support on Ubuntu Oneiric 64bit
from:http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/
I am posting this because it took me ages to figure out how to solve this one.
I could not get PIL to compile with JPEG, Zlib or freetype support on my virtualenv. I am using Ubuntu Oneiric Beta1 on a Lenovo Thinkpad X220. That is a 64bit installation.
As read in every blog post out there, you first need to install the system libraries so PIL can find them.
$ sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
After that, your regular pip install PIL should work under most situations. In my case I was still seeing this summary after the installation:
---------------------------------------------------------------
*** TKINTER support not available
--- JPEG support not available
--- ZLIB (PNG/ZIP) support not available
--- FREETYPE2 support not available
*** LITTLECMS support not available
---------------------------------------------------------------
After a lot of googling around, I found this solution on Ubuntu forums.
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.
# ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
# ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
# ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
Now proceed and reinstal PiL, pip install -U PIL:
---------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
---------------------------------------------------------------
tada
!
Update:
I just had this issue again on Ubuntu Precise, I found a solution here:
http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204-precise-pangolin/
# ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
# ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
# ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
Note the uname -i that prints the box’s arquitecture. This is a much more generic solution!
How to do it on Ubuntu Precise Pagolin 12.04
--------------------------------------------------------------------------------
后来根据http://effbot.org/downloads/#Imaging PIL源码安装包中的README方法解决更方便:
sudo apt-get install libjpeg62-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install liblcms1-dev
Install PIL with Jpeg support on Ubuntu Oneiric 64bit的更多相关文章
- Install PIL with Jpeg support on Raspbian Jessie
参考: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=79379 在 树莓派(Raspbian Jessie) 上安装djan ...
- Install PIL on mac osX10.9
follow this instruction: http://blog.csdn.net/liushuaikobe/article/details/8729652 and if you encoun ...
- 【转】install intel wireless 3165 driver for ubuntu 14.04.3
[转]install intel wireless 3165 driver for ubuntu 14.04.3 Ubuntu 14.04.3 with 3.19 kernel can’t drive ...
- pip install PIL The _imagingft C module is not installed
需要先删除PIL再进行安装 sudo pip uninstall -y PIL 删除PIL相关文件夹:/usr/local/bin/pil , usr/lib/python2.7/dist-packa ...
- python抠图与pip install PIL报错
窗口命令pip install PIL(python3.6+selenium——2.53.1+pycharm) from PIL import Image from selenium import w ...
- Install and Enable Telnet server in Ubuntu Linux
转:http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux 参考:http://auxnet.org/index ...
- Ubuntu 16.04安装ROS Kinetic详细教程 | Tutorial to Install and Configure ROS Kinetic on Ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/e2780b93/,欢迎阅读! Tutorial to Install and Configure ROS Kinetic on U ...
- How-to Install VMware Tools on Debian Stretch 9 32/64bit Linux+GNU
在虚拟机VMWARE上安装debian9 安装vmwaretools时候遇到问题 询问我IFCONFIG安装在哪里? 新版的debian不知道是用户权限问题还是使用了其他网络配置工具 vmwareto ...
- Install and Configure Apache Kafka on Ubuntu 16.04
https://devops.profitbricks.com/tutorials/install-and-configure-apache-kafka-on-ubuntu-1604-1/ by hi ...
随机推荐
- pyinstaller使用-python项目转换成exe可执行文件
http://blog.csdn.net/pipisorry/article/details/50620122 Python不是每个人的计算机里面都有安装,当您写了一个好用的工具,需要一个standa ...
- 分布式进阶(八)Linux提示Unable to locate package该如何处理?
Linux提示Unable to locate package该如何处理? 当你在修改Linux软件源的时候,提示Unable to locate package错误,这是由什么原因导致的呢?又该如何 ...
- Thinkpad W520 + Ubuntu 12.04LTS, 13.10, 14.04LTS安装Nvidia显卡驱动设置
Thinkpad W520 + Ubuntu 12.04LTS, 13.10, 14.04LTS安装Nvidia显卡驱动设置 http://henzhai.com/tech/2012/07/w520- ...
- 11.4、Libgdx的音频之录制PCM音效
(官网:www.libgdx.cn) 可以通过AudioRecorder接口访问PCM数据.通过如下方式创建一个接口实例: AudioRecorder recorder = Gdx.audio.new ...
- foreach 内嵌的使用
foreach内部处理数据流的每条记录,进行关系操作,最后用generate返回数据给外部.但注意关系操作符不能作用于表达式,要将表达式提取成关系. foreach内部只支持distinct, fil ...
- 分布式进阶(十三)Docker Container间实现数据共享
sudo docker run -it -v /usr/lib:/usr/lib/dbdata --name dbcontainer-192.168.1.184 ubuntu:14.04 sudo d ...
- Github最流行的10,000个Java项目使用的类库
本文由 ImportNew - Andy.Song 翻译自 takipiblog.欢迎加入翻译小组.转载请见文末要求. 前言 作为Java开发人员,总是需要面临这门不断成熟.高速改进中的语言.开发人员 ...
- Asp.Net中使用JQueryEasyUI--善良公社项目
jQuery UI 是以 jQuery 为基础的开源 JavaScript 网页用户界面代码库.包含底层用户交互.动画.特效和可更换主题的可视控件.我们可以直接用它来构建具有很好交互性的web应用程序 ...
- 《java入门第一季》之Character类小案例
/* * Character 类在对象中包装一个基本类型 char 的值 * 此外,该类提供了几种方法,以确定字符的类别小写字母,数字,等等,并将字符从大写转换成小写,反之亦然 * */ 下面通 ...
- 分布式进阶(十六)Zookeeper入门基础
Zookeeper入门基础 前言 在Zookeeper中,znode是一个跟Unix文件系统路径相似的节点,可以往这个节点存储或获取数据.如果在创建znode时Flag设置为EPHEMERAL,那么当 ...