which pip查看一下有沒有pip
[root@localhost ~]# which pip
/usr/bin/which: no pip in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
yum直接安裝(先安裝epel源怎诫,再安裝pip)
yum -y install epel-release
yum install python-pip
報(bào)錯(cuò)
[root@localhost ~]# yum -y install epel-release
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
解決方法: 一句話:把/etc/yum.repos.d/epel.repo,文件第3行注釋去掉,把第四行注釋掉.
打開/etc/yum.repos.d/epel.repo拒担,將
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
修改為
[epel]
name=Extra Packages for Enterprise Linux 6 - basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
再次運(yùn)行 安裝成功