pip是python中的一个包管理工具,可以对Python包的查找、下载、安装、卸载的作用。
如果没有安装pip工具,会提示bash: pip: command not found
一、安装pip工具
yum -y install python-pip
安装完成。
如果安装pip失败:
[root@bb921541fdb0 /]# yum -y install python-pip Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * base: mirrors.cn99.com * extras: mirrors.cn99.com * updates: mirrors.aliyun.com No package python-pip available. Error: Nothing to do
要先安装epel-release。
解决:
yum -y install epel-release yum -y install python-pip
二、升级pip的版本
pip install --upgrade pip
三、pip安装完成,查看帮助pip的使用
pip --help
四、查看已安装的包
pip freeze or pip list //或 pip list