1、安裝epel-release
[root@localhost ~]# yum -y install epel-release
2、安裝python-pip
[root@localhost ~]# yum -y install python-pip
3、升級pip
[root@localhost ~]# pip install --upgrade pip
4、檢查pip版本
[root@localhost ~]# pip --version
5、修改pip源
[root@localhost ~]# cd ~ #回到家目錄 [root@localhost ~]# mkdir .pip #創建.pip目錄 [root@localhost ~]# cd .pip [root@localhost .pip]# touch pip.conf #創建pip.conf配置文件 [root@localhost .pip]# vi pip.conf #在配置文件中增加如下內容 [global] index-url = http://pypi.douban.com/simple [install] trusted-host = pypi.douban.com #配置文件保存