一、情况描述
环境centos6.5 python2.6
使用yum install pip 提示没有包
二、pip大概介绍
pip是一个安装和管理Python包的工具,是easy_install的一个替换品
2.1 列出安装的packages
[root@localhost 20160716]# pip freeze
DEPRECATION: Python 2.6 is no longer supported by the Python
core team, please upgrade your Python. A future version of pip will
drop support for Python 2.6
argparse==1.4.0
Beaker==1.3.1
cups==1.0
cupshelpers==1.0
dbgp==1.1
decorator==3.0.1
Django==1.6b1
ethtool==0.6
firstboot==1.110
iniparse==0.3.1
iwlib==1.0
Mako==0.3.4
MarkupSafe==0.9.2
MySQL-python==1.2.5
ordereddict==1.2
pycurl==7.19.0
pygpgme==0.1
python-dmidecode==3.10.13
python-meh==0.11
scdate==1.9.60
slip==0.2.20
slip.dbus==0.2.20
smbc==1.0
urlgrabber==3.9.1
vim-debug==1.5.4
yum-metadata-parser==1.1.2
2.2、查询包
[root@localhost 20160716]# pip search
"Django"
2.3、 卸载包
pip uninstall 包名
2.4 升级包到最新版本
pip install -U 包名
2.5 安装特定版本额包(==, >=, <=,
>,
<)
pip install '包名<2.0'
三、安装pip
下载:https://yunpan.cn/cBGz988RzSdvD 访问密码
4f9d
python get-pip.py
(若提示错误,请把错误发表出来)
四、使用pip安装一些软件,OK