0

I just downloaded the python 2.7.5 desktop application with Python (command line) and IDLE. I can run a simple python script directly in IDLE but I cannot access python from the windows command prompt. I tried downloading get-pip.py but I couldn't find the location of setup.py on my computer and when I try to run get-pip.py from another location using IDLE it shows this error:

"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 [31m Could not find a version that satisfies the requirement pip (from versions: )[0m [31mNo matching distribution found for pip[0m"

How can I install PIP?

Thanks in advance.

Brianna Singer
  • 119
  • 1
  • 1
  • 8
  • Do you have a very good reason for using 2.7.5? I highly recommend that you use python 3 (it's on 3.7 now) if you can. Installing it through anaconda is the easiest option to get it running on windows, just be sure to choose the setting to add it to your windows PATH. The error you are having with `get-pip.py` sounds like maybe your organisation is needs to add an exception to https://pypi.org/simple/pip/ to how they deal with ssl certificates... but rather than fixing that you should just use the lastest Anaconda distribution – Dan Oct 23 '18 at 17:59
  • Default installation of python comes with pip. It should also install helper program py.exe. Can you run python from cmd by typing `python` or `py`? – mx0 Oct 23 '18 at 18:00
  • With Python 2.7.5, you can't. It's built against OpenSSL v0.9.8, which doesn't support TLS v1.2. `pypi.org` turned off TLS v1.0 and v1.1 recently, so you won't be able to download anything. Update your Python 2 version to the recent 2.7.15 that has TLS v1.2 support. – hoefling Oct 23 '18 at 20:26
  • Possible duplicate of [Not able to install Python packages \[SSL: TLSV1\_ALERT\_PROTOCOL\_VERSION\]](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version) – phd Oct 23 '18 at 20:43
  • https://stackoverflow.com/search?q=%5Bpip%5D+SSL+routines%3ASSL23_GET_SERVER_HELLO%3Atlsv1+alert+protocol+version – phd Oct 23 '18 at 20:44

1 Answers1

0

Use miniconda2 or minoconda3. Why? Miniconda has a windows installer that if installed correctly, updates the path for you. Miniconda also loads precompiled binaries so you do not need a C++ compiler, which is an annoying problem to run into on windows. Plus miniconda makes virtual enviornment setup a breeze with the command line. Also it comes with PIP if you need to fall back to it.

https://conda.io/miniconda.html

eatmeimadanish
  • 3,809
  • 1
  • 14
  • 20