[英]Not able to install any library [SSL: TLSV1_ALERT_PROTOCOL_VERSION]
Operating system : Mac OS 10.12.6 作业系统 :Mac OS 10.12.6
Python : I would like to install on 3.5 but there might be a confusion as you can see down here Python :我想在3.5上安装,但您可能会在这里看到困惑
pip version : 8.1.2 点版本 :8.1.2
First I was trying to install a library called scrapy using pip install scrapy
. 首先,我试图使用pip install scrapy
安装一个名为scrapy的库。 This happened: 这发生过:
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.
It suggested me to upgrade my pip, so I did pip install --upgrade pip
and surprise: 它建议我升级我的点子,所以我做了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.
One thing I noticed is that terminal is "talking" to Python 3.5 (as you can see in the error text above) however if I python --version
it returns Python 2.7.10. 我注意到的一件事是终端正在“交谈” Python 3.5(如您在上面的错误文本中所见),但是如果我使用python --version
它将返回Python 2.7.10。
So then I tried pip3 install scrapy
. 因此,我尝试了pip3 install scrapy
。 Same result. 结果相同。
I tried many suggestions from other posts and nothing works. 我尝试了其他帖子中的许多建议,但没有任何效果。 I'm going nuts here. 我要疯了。 Could someone help? 有人可以帮忙吗?
Since no one answered, I had to follow on my own. 由于没有人回答,因此我必须自己跟随。 The solution I found is not ideal but it worked. 我发现的解决方案并不理想,但确实有效。 I installed Anaconda and set it as my virtual environment. 我安装了Anaconda ,并将其设置为我的虚拟环境。 In that way I managed to either use scrapy (library I was looking for) as well as install other libraries. 这样,我设法使用了scrapy(我一直在寻找的库)以及安装了其他库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.