0

I am trying to install some packages with pip and getting error

pip install docker==2.7.0
  Could not find a version that satisfies the requirement docker==2.7.0 (from versions: )
No matching distribution found for docker==2.7.0

With -vvv option:

HTTPError: 403 Client Error: TLSv1.2+ is required for url: https://pypi.python.org/pypi/pip/json

Few days ago there was no such problem

pip version: pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)

Dmitriy Demidov
  • 523
  • 2
  • 6
  • 18

2 Answers2

2

The problem was in old openssl linked to system python. So I've uninstall all python distribs from system and install last python with brew install python@2

One can check openssl version linked to python like that

Python 2.7.14 (default, Mar 22 2018, 15:04:47)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.2o  27 Mar 2018'
Dmitriy Demidov
  • 523
  • 2
  • 6
  • 18
0
curl https://bootstrap.pypa.io/get-pip.py | python -

This worked for me, Mac Sierra 10.12.6... https://github.com/pypa/packaging-problems/issues/130

Swoop
  • 514
  • 5
  • 17