See pip's installation instructions: https://pip.pypa.io/en/stable/installation/ , my suggestion would be to try get-pip first as it supports limiting the pip version to install, which you would probably need to do as version 21 doesnt' support Python 2 anymore. Also see its README at https://github.com/pypa/get-pip Answer from JohnnyJordaan on reddit.com
See pip's installation instructions: https://pip.pypa.io/en/stable/installation/ , my suggestion would be to try get-pip first as it supports limiting the pip version to install, which you would probably need to do as version 21 doesnt' support Python 2 anymore. Also see its README at https://github.com/pypa/get-pip Answer from JohnnyJordaan on reddit.com
🌐
Reddit
reddit.com › r/learnpython › how to use pip on python 2.7? (windows)
r/learnpython on Reddit: How to use pip on python 2.7? (Windows)
January 21, 2022 -

I have to work with a python program that is written in python 2 (my job is to upgrade it to python 3 later, but first I need to run some tests in the current version) and have a lot of outdated packages.

I need to install the packages on my machine to make the program run. Currently I have both python 2 and 3 installed on my machine. When I run "python3 -m pip install [packageName]" it runs as it should. But when I try to run the same command using python2 instead, it gives me the message: "C:\Python27\python2.exe: No module named pip"

What can I do to install the packages on the older version of python?

Discussions

how to install pip for python 2.7? - Stack Overflow
No,I didn't compile python myself...I don't seem to able to find the python source under /usr/local ,how to I find the source? 2019-01-24T18:33:10.973Z+00:00 ... has been updated to: bootstrap.pypa.io/pip/2.7/get-pip.py. More on stackoverflow.com
🌐 stackoverflow.com
How can one install pip for python 2.7.3 on windows 10? - Stack Overflow
I'm trying to install pip for python 2.7.3 (unfortunately I don't have the choice of the python version I have to use) and when running get-pip.py (downloaded from the official website : https://pi... More on stackoverflow.com
🌐 stackoverflow.com
How to install pip on Python 2.7 in 2021 - Stack Overflow
I have legacy production servers that are still running Python 2.7.6. We have a local environment built from the docker image for ubuntu 14.04 intended to replicate that environment (things still work there once everything is installed.) The packer build script that creates this environment recently stopped working apparently due to PyPi dropping non-SNI support. I tried using get-pip... More on stackoverflow.com
🌐 stackoverflow.com
ubuntu - How to install pip for Python 2 - Stack Overflow
This answer is incorrect now that python2.7 is out of support. 2021-08-21T22:30:49.37Z+00:00 ... Not found check your command again. 2021-11-18T12:51:10.32Z+00:00 ... This works beautifully for ubuntu:trusty, whereas python2 get-pip.py doesn't work (results in "ERROR: Could not find a version ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
PyPI
pypi.org › project › pip
pip · PyPI
The PyPA recommended tool for installing Python packages. ... pip is the package installer for Python.
      » pip install pip
    
Published   Feb 05, 2026
Version   26.0.1
Find elsewhere
🌐
Google Groups
groups.google.com › g › obey-the-testing-goat-book › c › RHCR1t7mxgo
how to install pip for python2.7
Try downloading get-pip from https://pip.pypa.io/en/stable/installing/ and running it with "sudo python2.7 get-pip.py". ? On Sun, 23 Oct 2016, 12:55 Danlan Chen, <danlanc...@gmail.com> wrote: Hello, I have a problem when I am running this code below, do you have any idea?
Top answer
1 of 3
6

As the message says, PyPi has discontinued support for Python <2.7.9 as of May 6th 2021. If you're running a version < 2.7.9 and you cannot upgrade to a newer version of Python then your only option is to manually download the wheels from PyPi.

These are the modification I needed to make to my build script to make it work:

I needed to install software-properties-common and gcc

apt-get install -y software-properties-common gcc

Then I downloaded (setuptools](https://pypi.org/project/setuptools/44.1.1/#files) and unzipped and installed it:

python ./setuptools-44.1.1/setup.py install

Next, I downloaded pip and added it to a folder called wheels. Then I could use the whl file to run pip to get pip

python ./wheels/pip-20.3.4-py2.py3-none-any.whl/pip install --no-index --find-links ./wheels/ pip --ignore-installed

It was suggested to build a Docker container using Ubuntu 16.04 with Python 2.7.17 and use that to download the packages.

pip download -r requirements.txt

But the versions of the packages were wrong, so I ended up going through the requirements.txt and downloading each package manually from PyPi and adding it to the wheels folder. A running instance is useful so you can run pip freeze or look at a requirements.txt file to grab the version numbers of all the packages you need.

Now that I could use pip, I can install my other packages:

python pip install --no-index --find-links ./wheels/ -r /root/requirements.txt

This uncovered some dependencies that I hadn't downloaded packages for yet so I had to go through and download those and added them to the wheels folder. There were a few other things I found needed different versions than I had originally downloaded and a few packages relied on pbr and many more wanted wheel:

pip install --no-index --find-links ./wheels/ pbr==5.5.1 wheel==0.36.2

I also needed to download cMake and add it to the wheels folder

After that I could install my requirements.txt:

pip install --no-index --find-links ./wheels/ -r /root/requirements.txt --ignore-installed
2 of 3
2

May be late to the party but something similar happened to me while trying to make an HTTPS request with Python 2.7.6 (lack of SNI support). This was causing a lot of issues on a remote web server I work on.

Looking for answers I tried installing urllib3[secure] and entered a loophole since pip was complaining about a lack of SNI support to install this and other packages as well.

I found out this StackOverflow answer which helped me install the required dependencies to make Python 2.7.6 and pip itself support SNI as well as install urllib[secure].

You need to create a folder containing the required wheels (download them from PyPi using wget for instance):

pip, asn1crypto, enum34, idna, six, ipaddress, pyOpenSSL, cffi, cryptography wheels; and also pycparser (a non-wheel, it will be a tar.gz)

Make sure the wheels you download support Python 2.7 and that you install pip before the rest of them.

In the original answer, its stated you can use python -m OpenSSL.debug to verify everything worked correctly (a ModuleNotFoundError would mean the pyOpenSSL package was not installed). You can also use pip -Vto check that the new pip version was installed correctly as well.

After updating pip and installing these dependencies I was able to install urllib3[secure] and get SNI support from python as well as pip.

Good luck!

🌐
Quora
quora.com › How-do-I-install-a-pip-for-Python-2-7-5
How to install a pip for Python 2.7.5 - Quora
Answer (1 of 2): 1. Get get-pip.py 2. Run python get-pip.py 3. It is done.
🌐
MakeUseOf
makeuseof.com › home › programming › how to install python pip on windows, mac, and linux
How to Install Python PIP on Windows, Mac, and Linux
July 8, 2022 - PyPI hosts a large collection of frameworks, tools, and libraries for applications in finance, health, and more. If you’re using Python 2.7.9 (or greater), 3.4 (or greater), then PIP is already built into the Python installer.
🌐
GitHub
github.com › pypa › get-pip
GitHub - pypa/get-pip: Helper scripts to install pip, in a Python installation that doesn't have it. · GitHub
Helper scripts to install pip, in a Python installation that doesn't have it. - pypa/get-pip
Starred by 874 users
Forked by 338 users
Languages   Python
🌐
GitHub
github.com › pypa › pip › issues › 9577
Install pip with Python 2 needs documentation update · Issue #9577 · pypa/pip
February 9, 2021 - python get-pip.py Traceback (most ... {exc}") The correct way to install pip on Python 2 is: curl https://bootstrap.pypa.io/2.7/get-pip.py -o get-pip.py ·...
Author   gitclem
🌐
Emacsos
blog.emacsos.com › pip2-in-debian-11-bullseye.html
Install pip for Python2.7 in Debian 11 Bullseye
August 11, 2021 - Python 2.7 is still in Debian 11 Bullseye. But the python-pip package, which used to provide pip for python2, is gone. To get back pip for python 2.7, start a shell and run · wget https://bootstrap.pypa.io/pip/2.7/get-pip.py python2 get-pip.py
🌐
pip
pip.pypa.io › en › stable › installation
Installation - pip documentation v26.0.1
If your Python environment does ... This is a Python script that uses some bootstrapping logic to install pip. Download the script, from https://bootstrap.pypa.io/get-pip.py....
🌐
Reddit
reddit.com › r/learnpython › i need help installing pip for python 2.7
r/learnpython on Reddit: I need help installing pip for python 2.7
April 15, 2025 -

I will not upgrade Python, it needs to be 2.7. I am on Windows.

I don't want to really learn python, all I need is to install 1, single package and I will never be touching it again.

I keep seeing the link: https://bootstrap.pypa.io/pip/2.7/get-pip.py
but I am to dumb. Can someone do a step by step tutorial like I had 50 IQ?

Edit: Here is a picture. Maybe the pip is there, but I just don't know how to use it lol. https://i.postimg.cc/jdsfRTCP/dsadassadsdawanie.png