Python有两个封装了setuptools的包管理工具:easy_installpip。目前官方推荐使用pip

现在,让我们来安装一个第三方库——Python Imaging Library,这是Python下非常强大的处理图像的工具库。一般来说,第三方库都会在Python官方的pypi.python.org网站注册,要安装一个第三方库,必须先知道该库的名称,可以在官网或者pypi上搜索,比如Python Imaging Library的名称叫PIL,因此,安装Python Imaging Library的命令就是:

pip install PIL

出现如下问题:

Traceback (most recent call last):
File “/usr/bin/pip-python”, line , in <module>
from pkg_resources import load_entry_point
File “build/bdist.linux-x86_64/egg/pkg_resources.py”, line , in <module>
File “build/bdist.linux-x86_64/egg/pkg_resources.py”, line , in _build_master
File “build/bdist.linux-x86_64/egg/pkg_resources.py”, line , in require
File “build/bdist.linux-x86_64/egg/pkg_resources.py”, line , in resolve
pkg_resources.DistributionNotFound: pip==0.8

出现上述错误主要是由于python的版本太过老了,需要下载最新版本的setuptools

无奈之下,只好去安装easy_install并安装。

easy_install PIL
--------------------------------------------------------------------
PIL 1.1. SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.
platform linux2 2.7. (default, Jul , ::)
[GCC 4.8.]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script. To check the build, run the selftest.py script.
zip_safe flag not set; analyzing archive contents...
Image: module references __file__
Adding PIL 1.1. to easy-install.pth file
Installing pilprint.py script to /usr/local/bin
Installing pilfile.py script to /usr/local/bin
Installing pilconvert.py script to /usr/local/bin
Installing pildriver.py script to /usr/local/bin
Installing pilfont.py script to /usr/local/bin Installed /usr/local/lib/python2./site-packages/PIL-1.1.-py2.-linux-i686.egg
Processing dependencies for PIL
Finished processing dependencies for PIL

最新文章

  1. 解析大型.NET ERP系统 企业信息化实施人员工具箱
  2. [BZOJ2659][WC2012]算不出的算式(几何)
  3. 关于SecureCRT链接虚拟机和开发板的问题
  4. JGit与远程仓库链接使用的两种验证方式(ssh和https)
  5. codecomb 2085【肥得更高】
  6. UVa 12459 - Bees&amp;#39; ancestors
  7. 应聘linux/ARM嵌入式开发岗位
  8. MongoDB1: 环境安装
  9. shiro不重启动态加载权限
  10. kbengine服务端引擎技术概览
  11. 《Java大学教程》—第7章 类的实现
  12. python中$和@基础笔记
  13. Chrome 如何让光标快速定位到地址栏-进行搜索
  14. three.js - 渲染并展示三维对象
  15. ELK+Filebeat+Kafka+ZooKeeper 构建海量日志分析平台
  16. parseInt OR Number进行数字的转换
  17. kettle利用参数遍历执行指定目录下的所有对象
  18. Popup 解决置顶显示问题
  19. 华为LiteOS系统使用-任务调度函数-第一篇
  20. php获取今日、昨日、上周、本月的起始时间戳和结束时间戳的方法

热门文章

  1. SESSION机制(转)
  2. NTP POOL PROJECT:全球最大的免费NTP服务集群
  3. redis mysql验证 redis_mysql_check.py
  4. ansible 一键部署
  5. Win10自动重启原因怎么查Windows10无故自动重启
  6. iOS设计模式 - 备忘录
  7. [翻译] JTSReachability
  8. IE漏洞的调试心得
  9. Sublime Text3 使用总结
  10. php中empty(),isset(),is_null(),==,===区别