centos安装pip失败的问题
原文地址:
(1)https://www.cnblogs.com/saolv/p/6963314.html
(2)https://blog.csdn.net/u013414502/article/details/79532686?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task
安装pip
yum -y install python-pip
报错:
No package pip available.
Error: Nothing to do
解决方法:
需要先安装扩展源EPEL。
EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。
首先安装epel扩展源:
sudo yum -y install epel-release
然后再安装pip
sudo yum -y install python-pip
继续报错
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
最后这么解决: yum --disablerepo=epel -y update ca-certificates
另一种方法:
上PYPI这个网页https://pypi.org/
先搜索下载setuptools,解压到本地后,执行python setup.py install
然后搜索下载pip,解压后,执行python setup.py install