简体   繁体   中英

Not able to install any library [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

Operating system : 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
pip version : 8.1.2

First I was trying to install a library called scrapy using pip install 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:

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.

So then I tried 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. In that way I managed to either use scrapy (library I was looking for) as well as install other libraries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM