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.
Answer from Zina on Stack ExchangeYou 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.
Summarised from another site:
Core package repositories for CentOS 7 does not have python-pip. For that you need to enable an EPEL ("Extra Packages for Enterprise Linux") repository. You do that with
sudo yum install epel-release
After that, you should be able to install pip with
sudo yum install python-pip
Also possibly related:
- How to install pip in CentOS 7? (on StackOverflow, old)
- Recommended way to install pip(3) on centos7 (on StackOverflow, newer)
In particular, one answer there states that
Since Python 3.5,
pipis already bundled with the python distribution, so you can just runpython3.6 -m pipinstead ofpip.
alternate solution:
wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py
Hmm. A careful examination of my EPEL mirror shows that the package is now named python2-pip beginning with EPEL 7.
/srv/www/mirrors/epel/7/x86_64/p/python2-pip-8.1.2-5.el7.noarch.rpm
I would suggest that you try installing that.
You can always review a Yum mirror via your web browser to determine if it is a Yum problem, or if the package is missing from the mirror. In this case, it looks like the package is missing. Nothing is wrong with Yum. Your other systems may have cached repository data, or might be connecting to a different mirror with an outdated package list.
The next step would be to check the mailing lists and BugZilla to see if there has been any discussion.
I am actually not sure which mailing list would be correct here;
- epel-devel
- epel-announce
- epel-package-announce
I was able to find a conversation on BugZilla that might be related: pip install is broken (path/permissions) Maybe the package was pulled due to this. It doesn't seem like a serious issue..
If you cannot wait for this to be resolved, you might be able to find an older, unaffected version in Koji, the build system. (Check what version is installed and working on other systems.)
Lastly, it seems the SRPM is still available. You could grab it and rebuild it yourself to see if it will meet your needs. Though, if it was pulled, maybe there is good reason.
It was simple. The path of pip is:
/opt/python2.7/bin/pip
If it's not there then install using:
/opt/python2.7/bin/easy_install pip
and it will install it.
Following the pip installer documentation, one can simply issue the following:
# install setup tools
curl https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py | python -
# install pip
curl https://bootstrap.pypa.io/get-pip.py | python -
Is pip the same for 3.4+
No, it's not. A single
pipinstallation serves a single Python distribution (pip2.7/pip3.4/pip3.5etc).Since Python 3.5,
pipis already bundled with the python distribution, so you can just runpython3.6 -m pipinstead ofpip.Python 3.6 is not available in CentOS 7 vanilla repo. I usually resort to IUS repo when needing to install a fresh Python on CentOS. It always has the most recent Python version, the current one being 3.6.5. It also offers a correspondent
pippackage.$ yum install https://centos7.iuscommunity.org/ius-release.rpm $ yum install python36u python36u-devel python36u-pipUnfortunately, IUS doesn't offer a package for Python 3.7 yet so if you are looking for Python 3.7 on CentOS 7, building from source is your only option.
Edit: when yum is not an option
You should prefer the bootstrapping solution described in this answer as it is the most reliable way to get a working pip installed.
To install pip for python 3.6 on CentOS 7 you need to run
$ python3.6 -m ensurepip
The easiest way I've found to install pip3 (for python3.x packages) on CentOS 7 is:
$ sudo yum install python34-setuptools
$ sudo easy_install-3.4 pip
You'll need to have the EPEL repository enabled before hand, of course.
You should now be able to run commands like the following to install packages for python3.x:
$ pip3 install foo
curl https://bootstrap.pypa.io/get-pip.py | python3.4
Or if you don't have curl for some reason:
wget https://bootstrap.pypa.io/get-pip.py
python3.4 get-pip.py
After this you should be able to run
$ pip3