linux安装pip2.7

简介:

安装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

安装:

1
2
3
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/

安装:

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


3、创建软连接

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

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[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.










本文转自 曾哥最爱 51CTO博客,原文链接:http://blog.51cto.com/zengestudy/1789497,如需转载请自行联系原作者
目录
相关文章
|
15天前
|
Unix Linux
Linux/FreeBSD 安装
在Linux/FreeBSD上安装Julia 1.7.2的步骤:从[官方](https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.2-linux-x86_64.tar.gz)或[Tsinghua镜像](https://mirrors.tuna.tsinghua.edu.cn/julia-releases/bin/linux/x86/1.7/julia-1.7.2-linux-i686.tar.gz)下载二进制包,然后使用`tar`解压。
|
2天前
|
Oracle 关系型数据库 Linux
SuSE linux server 11通过SAP来安装oracle11g
SuSE linux server 11通过SAP来安装oracle11g
|
2天前
|
Linux C语言
suse linux 11 安装GCC开发环境
suse linux 11 安装GCC开发环境
|
3天前
|
关系型数据库 MySQL Linux
在Linux系统上实现高效安装与部署环境的全方位指南
在Linux系统上实现高效安装与部署环境的全方位指南
|
3天前
|
NoSQL Linux Redis
Redis的介绍,以及Redis的安装(本机windows版,虚拟机Linux版)和Redis常用命令的介绍
Redis的介绍,以及Redis的安装(本机windows版,虚拟机Linux版)和Redis常用命令的介绍
17 0
|
3天前
|
Ubuntu 安全 Linux
linux系统详细安装过程,都在这里了
linux系统详细安装过程,都在这里了
12 0
|
4天前
|
JSON Linux 数据格式
在宝塔Linux中安装Docker
在宝塔Linux中安装Docker
|
4天前
|
运维 监控 安全
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
|
5天前
|
安全 Linux Python
Volatility3内存取证工具安装及入门在Linux下的安装教程
Volatility3内存取证工具安装及入门在Linux下的安装教程
Volatility3内存取证工具安装及入门在Linux下的安装教程
|
6天前
|
关系型数据库 MySQL Linux
Linux CentOs7 安装Mysql(5.7和8.0版本)密码修改 超详细教程
Linux CentOs7 安装Mysql(5.7和8.0版本)密码修改 超详细教程