user9817595
user9817595

Reputation:

python InsecurePlatformWarning when downloading pip on Windows (python 2.7.5)

To download pip on Windows, I followed https://pip.pypa.io/en/stable/installing/ (downloading the get-pip.py file, and then running it on Command Prompt).

However, I got this:

Collecting pip c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject 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. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This 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-usage.html#ssl-warnings Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This 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-usage.html#ssl-warnings Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This 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-usage.html#ssl-warnings Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping Could not find a version that satisfies the requirement pip (from versions: ) No matching distribution found for pip

Any suggestions on what I can do? Do I need to use a newer version of python? Thank you :)

Upvotes: 0

Views: 6765

Answers (3)

Rishabh Sagar
Rishabh Sagar

Reputation: 4117

In my case, updating python version to 2.7.16 worked

Upvotes: 1

meyi
meyi

Reputation: 8112

You can upgrade to a newer version of Python to solve this.

So to answer your question: Yes, get a new version of python. According to the docs, you need python 2.7.9 or higher.

edit: I didn't see your version (2.7.5). So yes, it is a version issue. Updating python would solve it.

Upvotes: 3

user5777975
user5777975

Reputation:

There is something blocking your installation. Try to add proxy and try it:

set HTTP_PROXY=http://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>
set HTTPS_PROXY=https://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>

Upvotes: 0

Related Questions