The perfect solution for failure to install python-pip using yum in CentOS, centospython-pip
In the past, when I used Ubuntu, I felt that it was very easy to use ContOS, but it became a headache. I did not execute anything when I executed the following command to install python-pip.
yum install python-pip
Later, google said that this package is in the EPEL source. You only need to add the EPEL source. Then add it as described in the blog and execute the following command:
sudo rpm -ivh epel-release*
However, the system prompts that the latest epel package has been installed, but why can't it be used? Google had no results for more than a day, and finally I found a sentence in a blog that gave me a direction. Some sources in CentOS are disabled. You can use the following command to view the enabled and disabled sources.
// View the enabled source list yum repolist // view the disabled source list yum repolist disabled
I checked that epel is in the disabled list. How can I enable it? In fact, you only need to modify a file. Use vim to open the following file.
vim /etc/yum.repos.d/epel.repo
Change enabled = 0 in the first and third versions to enabled = 1. The second version is the test version, which may be unstable.
[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=$base arch failovermethod=priority enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6[epel-debuginfo] name=Extra Packages for Enterprise Linux 6 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch =$basearch failovermethod=priority enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 6 - $basearch - Source#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arc h=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 gpgcheck=1
Now you can use it. If you do not modify the above file, you can also add the following parameters to the installation command.
--enablerepo=epel
Example
yum --enablerepo=epel install python-pip
Summary
The above is a perfect solution to the failure of installing python-pip using yum in CentOS. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!