Pip: When installing pip: "No matching distribution found for install" SSL Error

Created on 2 May 2018  路  11Comments  路  Source: pypa/pip

  • Pip version: not installed
  • Python version: 2.7.0
  • Operating system: Windows 7 Ultimate 64-bit

Description:

I am trying to install pip on Python 2.7.0. It has to be in this version because I want to use 3Blue1Brown's manim. However, I get this message when I try to install pip:
Could not find a version that satisfies the requirement install (from versions : ) No matching distribution found for install

What I've run:

When I typed python get-pip.py, I got this message

  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SS
L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ins
tall/
c:\users\snake\appdata\local\temp\tmpbgk_ty\pip.zip\pip\_vendor\urllib3\util\ssl
_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. Th
is prevents urllib3 from configuring SSL appropriately and may cause certain SSL
 connections to fail. You can upgrade to a newer version of Python to solve this
. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-us
age.html#ssl-warnings
  Could not fetch URL https://pypi.org/simple/install/: There was a problem conf
irming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max
retries exceeded with url: /simple/install/ (Caused by SSLError(SSLError(1, '_ss
l.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol
 version'),)) - skipping
  Could not find a version that satisfies the requirement install (from versions
: )
No matching distribution found for install

I downloaded OpenSSL from this website and when I type
openssl version in cmd I get this:
OpenSSL 1.0.1f 6 Jan 2014
I think OpenSSL is installed correctly, but Python isn't using it (assuming it should).

auto-locked support

Most helpful comment

Python 2.7.15 is the latest version - just released yesterday. I'd strongly recommend trying that in the first instance. It's very unlikely that it's incompatible - compatibility between Python bugfix releases is typically very high.

Or maybe it's possible to update OpenSSL?

The risks of doing so (even if it is possible, which I strongly doubt) are likely higher than simply using 2.7.15...

All 11 comments

Python on Windows bundles its own OpenSSL version, and it's quite likely that the version bundled with 2.7.0 is too old. You can find the OpenSSL version used by Python via

import ssl
print(ssl.OPENSSL_VERSION)

You say you can't upgrade to the latest supported version of Python 2.7, so there's not much we can suggest here. Are you sure that your environment requires specifically 2.7.0, and not just (some version of) 2.7? I don't know of any other product that locks Python runtime requirements down right to the patchlevel.

A quick check of the link you provided suggests that the product supports 2.7, but doesn't explicitly require 2.7.0.

Hey @pfmoore , thanks for replying.
I wanted to use the version 2.7.0 based on this post, which I think used it considering the version he used didn't come with pip.

And you're right, Python 2.7.0 is already running with its version of OpenSSL:

>>> import ssl
>>> print(ssl.OPENSSL_VERSION)
OpenSSL 0.9.8l 5 Nov 2009

But if you think it's not possible to use this old version, I'll see if I can get away with Python 2.7.9... Or maybe it's possible to update OpenSSL?

Python 2.7.15 is the latest version - just released yesterday. I'd strongly recommend trying that in the first instance. It's very unlikely that it's incompatible - compatibility between Python bugfix releases is typically very high.

Or maybe it's possible to update OpenSSL?

The risks of doing so (even if it is possible, which I strongly doubt) are likely higher than simply using 2.7.15...

Thanks @pfmoore !
Just downloaded Python 2.7.15. I'm having different problems when installing manim now, but I will try to fix them with this version of Python anyway.

i cant imagine all of this is taking me time .the pip install with get-piy.py is returning error till now

I just updated my python version to 2.7.15 and now is working

I'm having the exact same problem. Any more suggestions? Here is my script (working in cmd on Windows 10 btw):

C:\Users\me>python get-pip.py
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))': /simple/pip/
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip

C:\Users\Me>import ssl
'import' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Me>python
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import ssl
print(ssl.OPENSSL_VERSION)
OpenSSL 1.0.2o 27 Mar 2018

@nickmcloota I gave up trying to install it on Windows 10. It worked fine on a dual boot with Ubuntu. Way easier to install

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

It looks like it may have only been an issue with Python 2.7.15. I was able to get it working by upgrading to Python 2.7.16.

Was this page helpful?
0 / 5 - 0 ratings