You are doing nothing wrong, 8.1.2 is the newest version of pip available in the EPEL 7 repo. RHEL/CentOS 7 usually doesn't get new versions of software, only bugfixes, and same applies to EPEL. There are some CVE fixes and other recent patches in the pip EPEL repo so I'd assume it's being actively maintained and safe to use.
Answer from Vojtech Trefny on Stack ExchangeYou are doing nothing wrong, 8.1.2 is the newest version of pip available in the EPEL 7 repo. RHEL/CentOS 7 usually doesn't get new versions of software, only bugfixes, and same applies to EPEL. There are some CVE fixes and other recent patches in the pip EPEL repo so I'd assume it's being actively maintained and safe to use.
8.1.2 is the latest version that's available in the RHEL repos for RHEL 7.6 (and also RHEL 7.8) for the corresponding version of Python which is 2.7. Version 19.3.1 is available but it's for Python 3.8. You can see it available if you enable the necessary RHEL repos and search for the package with yum:
subscription-manager repos enable rhel*
yum list available | grep python-pip
That will show you the latest versions for all of the available versions of Python including 8.1.2 for Python 2.7 and 19.3.1 for Python 3.8.
If you want version 21.x, then you need to install a later version of Python such as 3.8. Python 2.7 is no longer supported and won't receive anymore updates.
You have to enable the EPEL repo, use:
yum --enablerepo=extras install epel-release
This command will install the correct EPEL repository for the CentOS version you are running.
After this you will be able to install python-pip.
I was going crazy about the same issue. The reason why yum couldn't find python-pip was that it is not called python-pip anymore. Starting with EPEL Version 7 it is renamed to identify the python version. On my centOS machine i can find now the following python*-pip packages.
[root@asdasdasdasdsa ~]# yum info python*-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.rz.uni-frankfurt.de
* epel: mirrors.mit.edu
* extras: mirror.23media.de
* updates: ftp.plusline.de
Available Packages
Name : python2-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python 2 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
Name : python34-pip
Arch : noarch
Version : 8.1.2
Release : 5.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
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
Thanks for your feedback. First of all, if you try to run yum install python27-devel, then you should get the message like this:
No package python27-devel available
Then I followed this link,
yum search python | grep -i devel
This will show you that you have python-devel.x86_64 package available if your OS is a 64 bit OS. If I am correct, then the following command should work fine as shown in the accepted answer:
yum install python-devel.x86_64
I run Centos 6.5 on Virtualbox and this command solved it.
# yum update
# yum install centos-release-SCL
# yum install python27
The following worked for me on Amazon Linux AMI 2:
sudo yum -y install python-pip
To install pip3.6 in Amazon Linux., there is no python36-pip. If you install python34-pip, it will also install python34 and point to it.
The best option that worked for me is the following:
#Download get-pip to current directory. It won't install anything, as of now
curl -O https://bootstrap.pypa.io/get-pip.py
#Use python3.6 to install pip
python3 get-pip.py
#this will install pip3 and pip3.6
Based on your preference, if you like to install them for all users, you may choose to run it as 'sudo'