Closed clenchedteeth closed 3 years ago
Try this, although it might not be super secure if you don't know where you are downloading from:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
Thanks for your feedback @clenchedteeth. It looks like this page explains what the problem is and how to fix it. Could you please try it? The solution seems to be running:
sudo port install curl-ca-bundle
If this solves the issue, I'll update the README.md to mention this case.
Thanks again!
ps: I personally installed Python using miniconda. There are several benefits, including the fact that you can use different versions of Python depending on the environment, and it does not have any SSL issue. I recommend it.
@ageron Works perfectly, thank you!
Related to #46, I get an error about SSL certificates. The solutions given in #46 assume that the official python installer was used. However, I am using a macports version of python, and the solutions in #46 do not cover this option. Using macports is one of the approaches that the book recommends, and this piece of code is the first "real" piece of code encountered in the book, so I consider this problem worth addressing in a separate bug report.
Edit: Additionally, the solution e.g. #339 to run
pip3 install --upgrade certifi
did not work in my case.