Error installing Python library

Asked

Viewed 216 times

0

I have python 2.7.14 installed with Pip 9.0.1 on a Macbook. I was experiencing an error trying to run Pip.list from the terminal.

I checked on Google that I needed to edit the Pip.conf file, but I couldn’t find it. So I checked the path it should be, /Library/Application Support/Pip, and create the file with the following content:

[list]
format=columns

When I try to run a command to install a package over the terminal, for example:

pip install beautifulsoup4

I have the following return:

Collecting beautifulsoup4
  Cache entry deserialization failed, entry ignored
  Could not fetch URL https://pypi.python.org/simple/beautifulsoup4/: 
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 
beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4

Could someone help me solve?

  • This problem occurred before you created the pip.conf?

1 answer

1

Updates Pip as follows:

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

This error is related to a change in all Python.org related pages: no longer support TLS versions 1.0 and 1.1. This means that for OSX <= 10.12 only the pip if updated by the above method.

Alternatively, this error should also be solved if it updates to OSX >= 10.13.


Credits for the Anupam: https://stackoverflow.com/a/49748494/3079302

Browser other questions tagged

You are not signed in. Login or sign up in order to post.