How to install PIL in Ubuntu 11.04?
来源:互联网 发布:俊平护肤品怎么样知乎 编辑:程序博客网 时间:2024/05/22 00:43
As always, use the package manager:
sudo apt-get install python-imaging
It'll deal with it all for you. The packages are available.
Manually installing, in any Linux distro, is a wasted endeavour, unless the packages really don't exist. Package maintainers spend time ensuring that the package works and installs correctly, there is no point duplicating their effort. Especially not to manually install something that then doesn't have the advantages of a package - no automatic updating, no easy removal, etc...
Try reinstalling from scratch:
Look for lib/pythonXX/site-packages/PIL. Delete all this directory along with the file PIL.pth. This should completely remove te package.
Unpack the PIL installation files from the *tar.gz you downloaded.
Add the directories where your jpeg library is, with add_directory(...) as you did before. (Use ldconfig -P | grep jpeg to find where the libraries are).
Retry python setup.py build, then python setup.py install. Test it.
I found it to be a combination of the two above when installing with a requirements.txt on Ubuntu. I'm using Vagrant to run a chef script, and found this approach works best for me:
First, I use a bash script to setup PIL:
#!/usr/bin/env bashsudo apt-get build-dep python-imagingsudo ln -s -f /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/sudo ln -s -f /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/sudo ln -s -f /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
- How to install PIL in Ubuntu 11.04?
- How to install sun-java5-jdk in Ubuntu 11.04
- How to install Skype in Ubuntu 7.10?
- How to install & uninstall software in ubuntu
- how to install java in ubuntu
- How To Install VirtualBox 4.0 In Ubuntu
- How to Install Older Kernel in Ubuntu
- how to install git1.8.0 in Ubuntu
- how to install dictionary in ubuntu.
- How to install opencv in Ubuntu
- How to install sun java in ubuntu
- How to install Tomcat in Ubuntu 14.04
- how to install opencv in ubuntu
- How to Install GMP in Ubuntu
- How to install OpenGrok in ubuntu 14?
- how to install eclipse in ubuntu (PyDev)
- 【Ubuntu手记】 How to install jdk in Ubuntu 11.10
- [Ubuntu]How to install Google Chrome in Ubuntu
- 博弈论基础知识
- linux下crontab 任务不执行的可能原因总结
- Mysql事务隔离级别
- DP(动态规划) PPT
- 3xian教主的警世良言兼退役贴
- How to install PIL in Ubuntu 11.04?
- 体会函数参数传递
- Android java 关于 Timer schedule 执行定时任务
- 面试之机器学习算法思想简单梳理
- python关于列表转为字典的两个小方法
- linux(centos)下搭建Storm(0.8.1)集群(很长,但很详细!!!)
- 操作系统中堆和栈的区别
- Windows下安装storm-0.9.1
- python编码规范