MacOS上的pip3:安装virtualenv时出现SSL错误

时间:2018-11-11 17:55:09

标签: python-3.x macos ssl pip virtualenv

当我运行此命令时:

pip3 install virtualenv

它返回以下内容:

Collecting virtualenv
  Could not fetch URL https://pypi.python.org/simple/virtualenv/: 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 virtualenv (from versions: )
No matching distribution found for virtualenv

我该如何解决? 谢谢你的帮助

1 个答案:

答案 0 :(得分:0)

这解决了我的问题:

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

pip3 install virtualenv