3

I am unable to install any new Python packages using pip. This question seems to solve the issue for a lot of people, but not me. When I run

curl https://bootstrap.pypa.io/get-pip.py | python

I get

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

Some of the other answers to that question lead me to believe I need to update TLS to version 1.2, since running

python2 -c "import urllib2,json; print(json.loads(urllib2.urlopen('https://www.howsmyssl.com/a/check').read())['tls_version'])"

returns TLS 1.0

But I can't figure out how to do it. I'm currently using:

  • MacOS 10.11
  • pip 9.0.1
  • Python 2.7.11
  • Python 3.5.2

Any ideas?

Mike S
  • 1,031
  • 1
  • 9
  • 21
  • What operating system are you using? – Ash Apr 26 '18 at 15:57
  • Sorry, @Josh I'm on MacOS 10.11. I'll update my post – Mike S Apr 26 '18 at 16:00
  • @Prateek Using pip 9.0.1, Python 2.7 and Python 3.5.2. – Mike S Apr 26 '18 at 16:02
  • 2
    Are you using Python 2.7.0? The SSL versions available vary widely between versions of Python 2.7. TLS 1.2 wasn't introduced into Python 2.7 until 2.7.9. – Kevin D Apr 26 '18 at 16:23
  • You are mixing pip and python versions , stick to one. use pip3 and python3 for python 3 – Morse Apr 26 '18 at 16:27
  • @KevinD. 2.7.11. The .11 got deleted while I was typng – Mike S Apr 26 '18 at 16:31
  • @Prateek I'm already using `pip` with `python`(2) and `pip3` with `python3` – Mike S Apr 26 '18 at 16:32
  • either reinstall python or just upgrade openssl with brew command. This question seems to be duplicate as other questions have different working solutions – Morse Apr 27 '18 at 00:09
  • https://stackoverflow.com/questions/49734434/unable-to-install-python-libraries#answer-49735005 – Morse Apr 27 '18 at 00:42
  • Possible duplicate of [Unable to install python libraries](https://stackoverflow.com/questions/49734434/unable-to-install-python-libraries) – Morse Apr 27 '18 at 00:43
  • @Wmbuch perhaps try to upgrade `curl` then? See [this](https://stackoverflow.com/q/46422590/1526703) similar issue about curl returning that error. – Anupam Apr 27 '18 at 05:03
  • Did you resolve this issue? I'm facing the same problem – Ferenc Aug 09 '18 at 12:04
  • @Ferenc I don't think I did. I can't recall what I was trying to install, but I'm guessing I just gave up – Mike S Aug 09 '18 at 13:33

0 Answers0