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.
If you have python(python2) installed you then you can use following command to install pip(for python2).
Copycurl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
Now you can check for pip2
Copypip2 --version
I hope these will help you
Please try this
Copysudo apt-get install python3-pip
Videos
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.
python-pip is in the universe repositories, therefore use the steps below:
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python-pip
I ran into this problem trying to install pip for python2; e.i. I wanted pip2. What worked for me was this:
sudo apt-get update && sudo apt-get install python-pip
Hope this helps someone.
The package is called python3-pip. Python 2.7 is not shipped anymore with Ubuntu 20.04, nearly all python related packages are now called python3-*.
To get the Python 2 version of pip back, you can use get-pip, which is a single script that downloads and installs the latest version of pip (for Python 2 or 3, whichever version you run the script with):
$ curl -O https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1824k 100 1824k 0 0 2211k 0 --:--:-- --:--:-- --:--:-- 2211k
$ python get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
Using cached pip-20.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.1
Uninstalling pip-20.1:
Successfully uninstalled pip-20.1
WARNING: The scripts pip, pip2 and pip2.7 are installed in '~/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.1
Then add ~/.local/bin/ to your PATH (e.g. in your ~/.bashrc):
PATH=$HOME/.local/bin/:$PATH
After that you should have a working pip command for Python 2. Or use pip2 / pip2.7 if you want to make sure you're not targeting Python 3.
I don't believe python-pip exists anymore in 20.04, looks like it has been removed from the repositories and is removed during the upgrade from 18.04(in my case 19.10) to 20.04. Maybe the functionality of the package has been bundled with a different python package?
20.04 upgrade
Use pip3 instead of pip
I will assume you are using the Python3 version so you can install pip3 with
sudo apt-get install python3-pip
then you can install whatever you wanted starting with;
pip3 install
All the best :)
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
First use this command
sudo apt-get update
Two packages will be downloaded, of size 16 MB. Then:
sudo apt-get install python2-pip
I tried this and it worked for me:
# Download current package information.
sudo apt-get update.
# Install a new package.
sudo apt-get install python3-pip
# Test the package install.
pip -V
» pip install pip