This is a very old post, but it's the first thing that appeared when I googled for ubuntu how to install pip2
- I use python3 and whilst I do have a python2, it's bare-bones.
For the first time, I'm having to use equivelent of pip for python2. Following the OP provided URL, and then running it with python2.7 get-pip.py
I found it gives me the answer in its output! It tells you get get [this script at https://bootstrap.pypa.io/pip/2.7/get-pip.py] (https://bootstrap.pypa.io/pip/2.7/get-pip.py) and use that instead. I don't know if that is new, since this post is dated last year, but I thought it was well worth providing an updated answer:
noscere@bertram:~$ wget https://bootstrap.pypa.io/get-pip.py
noscere@bertram:~$ chmod +x get-pip.py
noscere@bertram:~$ python2.7 ~/bin/get-pip.py
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
noscere@bertram:~$ mv get-pip.py ~/bin/get-pip3.py
noscere@bertram:~/src/ubuntu-tweak$ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
noscere@bertram:~$ chmod +x get-pip.py
noscere@bertram:~$ python2.7 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 pip 21.0 will remove support for this functionality.
Collecting pip<21.0
Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 146 kB/s
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, wheel
Successfully installed pip-20.3.4 wheel-0.37.1