问题:There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 ...

问题描述:
安装flask-script时,出现异常提示:

Collecting Flask-Script==2.0.6
  Could not fetch URL https://pypi.python.org/simple/flask-script/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
  Could not find a version that satisfies the requirement Flask-Script==2.0.6 (from versions: )
No matching distribution found for Flask-Script==2.0.6
图1

原因:
python社区已不支持TLS version 1.0 & 1.1
pip版本过低,不支持TLS version 1.2
因此需要升级pip

解决办法:

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

然后再执行pip install Flask-Script==2.0.6即可

参见:https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version

你可能感兴趣的:(问题:There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 ...)