11

I am running OSX Sierra 10.12.6 on a macbook pro

There's known bug in pip 10.0.0b1 that causes a Trap: 5 when you try to install anything. This also prevents you from updating pip itself to 10.0.0b2, which supposedly fixes this bug.

So - I uninstalled pip, thinking I'd go back to easy_install to get the latest - BUT NOOOO! (sound of grinding teeth here ...)

This is what I get:

(** start console output)

sudo easy_install pip Password:

Searching for pip Reading https://pypi.python.org/simple/pip/

Download error on https://pypi.python.org/simple/pip/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!

Couldn't find index page for 'pip' (maybe misspelled?)

Scanning index of all packages (this may take a while)

Reading https://pypi.python.org/simple/

Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!

No local packages or download links found for pip

error: Could not find suitable distribution for Requirement.parse('pip')**

(** end console output)

I'm trying to avoid uninstalling and reinstalling everything pythonic. The output above seems to indicate a problem with SSL/TLS versions, but it doesn't tell me enough to figure what.

Any help? I can't believe that MAC OSX doesn't support the proper SSL/TLS versions. I think that message is a red herring (or a 'frog with no legs' if you get that reference)

TIA

CJH
  • 163
  • 1
  • 12
  • Possible duplicate of [pip install fails for every package ("Could not find a version that satisfies the requirement")](https://stackoverflow.com/questions/49748063/pip-install-fails-for-every-package-could-not-find-a-version-that-satisfies-th) – phd Apr 13 '18 at 22:28
  • 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) – Anupam Apr 14 '18 at 04:05
  • unfortunately I haven't been able to locate any clear, comprehensible procedure to fix this problem - is there a way to easily get my system (OSX Sierra 10.12.6) to used TLS v1.2 which easy_install seems to require, and if so, how? all the things I've looked at relating to system setting lead me to dead ends. Of do I need to remove everything pythonic and satr over again hoping it will all shake out? – CJH Apr 16 '18 at 15:25
  • Possible duplicate of [pip fails with SSLError on MacOS because of outdated certificate - how to recover?](https://stackoverflow.com/questions/49998942/pip-fails-with-sslerror-on-macos-because-of-outdated-certificate-how-to-recove) – natronite May 31 '18 at 11:51

1 Answers1

3

It's because of the deprecated TLSv1; so you have to install pip in a more round-abount way.

    #You may need to do this as user root:
    curl https://bootstrap.pypa.io/get-pip.py | python
    #to confirm it is working:
    pip install --upgrade pip

This is based on the solution in Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

  • 2
    Doesn't work: `# pip: command not found` but it's there... hidden away in `/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/pip`. Whoever called it "easy_install" needs to be on support for everyone that gets "stuck". – fret Oct 16 '18 at 11:42