I am trying to install python-pip on CentOS 7 minimal server. However, I got the error No package python-pip available. Below is the complete error message.
# yum install python-pip Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.vhost.vn * centos-ceph-nautilus: mirrors.vhost.vn * centos-nfs-ganesha28: mirrors.vhost.vn * centos-qemu-ev: mirrors.vhost.vn * extras: mirrors.vhost.vn * updates: mirrors.vhost.vn No package python-pip available. Error: Nothing to do
Solution: The CentOS 7 minimal server installation doesn’t include the EPEL repository by default. Firstly install EPEL repository and enable it.
How to solve “No package python-pip available” during yum installation
Step 1: Install EPEL repository
# yum -y install epel-release
[OR]
Download the EPEL repository rpm file from fedora project as below:
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install from the downloaded EPEL repo rpm file
# yum install epel-release-latest-7.noarch.rpm
Step 2: Now you can install python-pip
as below:
# yum install -y --enablerepo="epel" python-pip
Starting from EPEL version 7, python-pip is renamed to identify the python version such as python2-pip
, python3-pip
, python34-pip
etc., By default python-pip on CentOS 7 is python2-pip
. Use the below yum command to find the different versions of pip available for different python versions.
# yum info python*-pip Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.vhost.vn * centos-ceph-nautilus: mirrors.vhost.vn * centos-nfs-ganesha28: mirrors.vhost.vn * centos-qemu-ev: mirrors.vhost.vn * epel: mirror2.totbb.net * extras: mirrors.vhost.vn * updates: mirrors.vhost.vn Installed Packages Name : python2-pip Arch : noarch Version : 8.1.2 Release : 14.el7 Size : 7.2 M Repo : installed From repo : epel Summary : A tool for installing and managing Python 2 packages URL : http://www.pip-installer.org License : MIT and BSD and ASL 2.0 and ISC and Python and (ASL 2.0 or BSD) and LGPLv2+ Description : Pip is a replacement for easy_install. It uses mostly the : same techniques for finding packages, so packages that were made : easy_installable should be pip-installable as well. Available Packages Name : python3-pip Arch : noarch Version : 9.0.3 Release : 8.el7 Size : 1.6 M Repo : base/7/x86_64 Summary : A tool for installing and managing Python3 packages URL : http://www.pip-installer.org License : MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) Description : pip is a package management system used to install and manage software packages : written in Python. Many packages can be found in the Python Package Index : (PyPI). pip is a recursive acronym that can stand for either "Pip Installs : Packages" or "Pip Installs Python". Name : python34-pip Arch : noarch Version : 8.1.2 Release : 14.el7 Size : 1.7 M Repo : epel/x86_64 Summary : A tool for installing and managing Python3 packages URL : http://www.pip-installer.org License : MIT and BSD and ASL 2.0 and ISC and Python and (ASL 2.0 or BSD) and LGPLv2+ Description : Pip is a replacement for easy_install. It uses mostly the : same techniques for finding packages, so packages that were made : easy_installable should be pip-installable as well.