Installing Scrapy and TLS version alert


I am working on setting up my computer for the Python final project and running into trouble with Scrapy. Web search indicates that an upgrade is needed for TLS to version 1.2, but I haven’t figured out how to do that. Any help or workaround suggestions are appreciated!

$ pip install scrapy
Collecting scrapy
  Could not fetch URL There was a problem 
confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 
alert protocol version (_ssl.c:661) - skipping
  Could not find a version that satisfies the requirement scrapy (from versions: )
No matching distribution found for scrapy```


What exactly does pip refer to in that environment? If it belongs to your os then that may not be at all where you should be installing scrapy and moreover it may not be the python version you ought to be using


I installed Python 2.7 and was using Terminal version 2.8 on Mac to try the scrapy install. Sorry if this doesn’t answer your question - I’m new to this. Thanks for your help.


What does this say?

$ pip --version ; python --version ; which pip python

pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)
Python 2.7.14


I’d like to think that python version has a high enough version of ssl

To be entirely sure it doesn’t, try:

python --version
python -m pip install --user scrapy  

The first one being to double check once again that you’re referring to the right installation, and the second one being to ensure you’re using its pip
–user is to avoid system-wide installation of the package (remove it if that’s what you really want, I don’t think it belongs there though)

And if that’s the same outcome still then I have no suggestions.
If you get a different outcome the most likely explanation is that you had an old terminal open which had stored the old location of python


It’s giving me the same outcome, unfortunately. Thanks anyway for your time.


An update… problem was resolved by installing a newer version of pip (10.0.1) using

curl | sudo python

setuptools was also updated and incremental installed before scrapy installed correctly.