首页 > 系统服务 > 详细

linux安装pip2.7

时间:2016-06-15 16:12:39      阅读:231      评论:0      收藏:0      [点我收藏+]

安装pip2.7必须先安装先python2.7。如果用python2.6安装的pip,则pip版本就是pip2.6。

前面文章已经介绍了python2.7的安装方法,这里不再介绍。


pip2.7的安装


1、安装setuptools

下载地址:https://pypi.python.org/pypi?%3Aaction=search&term=setuptools&submit=search

安装:

tar zxf setuptools-19.6.2.tar.gz
cd setuptools-19.6.2
python2.7 setup.py install



2、安装pip

下载地址:https://pypi.python.org/pypi/pip/

安装:

tar zxf pip-8.1.0.tar.gz 
cd pip-8.1.0
python2.7 setup.py install


3、创建软连接

ln -s /usr/local/python27/bin/pip2.7 /usr/bin/pip2.7

注意:pip2.7安装完成后,生成的执行文件在python2.7的bin目录下

[root@dnsserver bin]# ll
total 6184
-rwxr-xr-x 1 root root     110 Jan  9 10:31 2to3
-rwxr-xr-x 1 root root     326 Jan  9 10:59 easy_install
-rwxr-xr-x 1 root root     334 Jan  9 10:59 easy_install-2.7
-rwxr-xr-x 1 root root     108 Jan  9 10:31 idle
-rwxr-xr-x 1 root root     284 Jan  9 11:00 pip
-rwxr-xr-x 1 root root     286 Jan  9 11:00 pip2
-rwxr-xr-x 1 root root     290 Jan  9 11:00 pip2.7
-rwxr-xr-x 1 root root      93 Jan  9 10:31 pydoc
lrwxrwxrwx 1 root root       7 Jan  9 10:31 python -> python2
lrwxrwxrwx 1 root root       9 Jan  9 10:31 python2 -> python2.7
-rwxr-xr-x 1 root root 6271362 Jan  9 10:31 python2.7
-rwxr-xr-x 1 root root    1696 Jan  9 10:31 python2.7-config
lrwxrwxrwx 1 root root      16 Jan  9 10:31 python2-config -> python2.7-config
lrwxrwxrwx 1 root root      14 Jan  9 10:31 python-config -> python2-config
-rwxr-xr-x 1 root root   18556 Jan  9 10:31 smtpd.py
[root@dnsserver bin]# pip2.7 
Usage:   
  pip <command> [options]
Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion
  help                        Show help for commands.


本文出自 “zengestudy” 博客,转载请与作者联系!

linux安装pip2.7

原文:http://zengestudy.blog.51cto.com/1702365/1789497

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!