SSL:当我安装django-constance时TLSV1_ALERT_PROTOCOL_VERSION

时间:2018-05-15 06:29:22

标签: python django pip

我无法安装django-constance。

重现的步骤

$ pip3 install django-constance
Collecting django-constance
Could not fetch URL https://pypi.python.org/simple/django-constance/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Could not find a version that satisfies the requirement django-constance (from versions: )
No matching distribution found for django-constance

系统配置

Django version:
$ django-admin --version
1.11.1

Python version:
$ python3 --version
Python 3.5.2

$ pip3 --version
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)

1 个答案:

答案 0 :(得分:1)

使用:

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

将点数升级到最新版本,而不是pip3 install -upgrade pip

然后重新安装django-constance