C
C
Cynosure2019-06-18 02:51:23
Python
Cynosure, 2019-06-18 02:51:23

How to install pip on Windows 10 for Python 2.7?

I can't install pip for Python 2.7 . It
gives the following errors:

ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip

What is the problem? It seems that the path to the folder is registered, in CMD via cd it normally gets to the get-pip.py file, but categorically does not want to install it. When I try to enter into the command line "pip" says that
"pip" is not an internal or external
command, operable program, or batch file.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sound901, 2019-06-18
@saund901

Maybe so? cmd -> C:\Python27\python.exe get-pip.py

K
kagary 06, 2019-06-18
@kagary06

If you do not want to delve into the environment settings, then the best option is to download the installation file from the python.org website and select one of the components when installing pip.
If you already have a version of Python and you need to carefully and simply "roll" the current version of pip to this version, then you need to download the get-pip.py script from the link . Save it to disk and run it with python.exe get-pip.py.

V
van9petryk, 2020-01-10
@van9petryk

Best of all, download a newer version of Python, 2.7.15 or 2.7.17, where pip is already installed by default (or by check).
But if you need exactly 2.7.0, then here is the link , a similar problem.
As far as I understood in python 2.7.0 the deprecated ssl library. I ran into this problem myself and this is what python get-pip.py outputs:
"An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform . This may cause the server to present an incorrect TLS certificate, which can cause validation failures . For more information, see https://urllib3.readthedocs.io/en/latest/advanced -... "
Here is a wiki page that says at the very bottom that SNI in Python has been supported since version 2.7.9.
So, either set python >= 2.7.9, or update the ssl module manually. Try this tip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question