I'm trying to use pipenv
in a new Django project. However, if I try to pipenv install django
, I get an error confirming the SSL certificate:
Kurts-MacBook-Pro:wemap kurtpeek$ pipenv install django
Installing django...
Collecting django
Could not fetch URL https://pypi.python.org/simple/django/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Error: An error occurred while installing django!
Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django
I've recently run a brew upgrade
; here are my Pipenv and Python versions:
Kurts-MacBook-Pro:wemap kurtpeek$ pipenv --version
pipenv, version 2018.7.1
Kurts-MacBook-Pro:wemap kurtpeek$ python --version
Python 3.7.0
I've tried the answer of Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION] but this essentially didn't do anything as my pip
version was already up-to-date:
Kurts-MacBook-Pro:wemap kurtpeek$ curl https://bootstrap.pypa.io/get-pip.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1604k 100 1604k 0 0 583k 0 0:00:02 0:00:02 --:--:-- 583k
Collecting pip
Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 18.0
Uninstalling pip-18.0:
Successfully uninstalled pip-18.0
Successfully installed pip-18.0
I am running MacOS Sierra version 10.12.6, so this does indeed seem to be caused by the TLS 1.0 deprecation issue described in 'pip install' fails for every package ("Could not find a version that satisfies the requirement"). But how to remedy this?