The perfect solution for failure to install python-pip using yum in CentOS, centospython-pip

Source: Internet
Author: User
Tags yum repolist metalink

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.