1、首先檢查linux有沒有安裝python-pip包,終端執行 pip -V
[root@ network-scripts]# pip -V
-bash: pip: command not found
2、沒有python-pip包就執行命令 yum -y install epel-release
[root@ network-scripts]# yum -y install epel-release
3、執行成功之后,再次執行yum -y install python-pip
[root@ network-scripts]# yum install python-pip
4、對安裝好的pip進行升級 pip install --upgrade pip
[root@ network-scripts]# pip install --upgrade pip
至此,pip安裝好了,執行pip -V 再次檢查pip環境。
[root@ network-scripts]# pip -V pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)