美文网首页每日爬虫
linux有python没有pip

linux有python没有pip

作者: 一只失去梦想的程序猿 | 来源:发表于2020-09-10 09:13 被阅读0次

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

报错

[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 baseurl=http://download.fedoraproject.org/pub/epel/6/basearch

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

再次运行 安装成功

相关文章

网友评论

    本文标题:linux有python没有pip

    本文链接:https://www.haomeiwen.com/subject/waluektx.html