【问题标题】:Not able to install any library [SSL: TLSV1_ALERT_PROTOCOL_VERSION]无法安装任何库 [SSL: TLSV1_ALERT_PROTOCOL_VERSION]
【发布时间】:2018-04-18 13:06:18
【问题描述】:

操作系统:Mac OS 10.12.6
Python:我想在 3.5 上安装,但可能会出现混乱,您可以在此处看到
br>pip 版本:8.1.2

首先我尝试使用pip install scrapy 安装一个名为scrapy 的库。这发生了:

Could not fetch URL https://pypi.python.org/simple/pip/:
There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION]
tlsv1 alert protocol version (_ssl.c:646) - skipping
Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
You are using pip version 8.1.2, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

它建议我升级我的 pip,所以我做了pip install --upgrade pip 并感到惊讶:

Could not fetch URL https://pypi.python.org/simple/pip/:
There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION]
tlsv1 alert protocol version (_ssl.c:646) - skipping
Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
You are using pip version 8.1.2, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

我注意到的一件事是终端正在与 Python 3.5 “对话”(如您在上面的错误文本中所见),但是如果我 python --version 它返回 Python 2.7.10。

然后我尝试了pip3 install scrapy。结果一样。

我尝试了其他帖子的许多建议,但没有任何效果。我要疯了。 有人可以帮忙吗?

【问题讨论】:

标签: python ssl terminal openssl ssl-certificate


【解决方案1】:

由于没有人回答,我只好自己跟着。我发现的解决方案并不理想,但确实有效。 I installed Anaconda 并将其设置为我的虚拟环境。通过这种方式,我设法使用了 scrapy(我正在寻找的库)以及安装其他库。

【讨论】:

    猜你喜欢
    • 2020-04-26
    • 2018-12-29
    • 2018-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-12
    相关资源
    最近更新 更多