In my brand new M1 machine I simply installed
- Python from the website (3.5.11)
- Visual Studio Code
- python3 -m pip install feedparser
- pip install certifi
- I verified CAs are present locally
- pip show certifi
Name: certifi Version: 2023.7.22 Summary: Python package for providing Mozilla's CA Bundle. Home-page: https://github.com/certifi/python-certifi Author: Kenneth Reitz Author-email: [email protected] License: MPL-2.0 Location: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages Requires: Required-by:
And if I created this code:
import feedparser
rss_url = "https://news.google.com/rss"
feed = feedparser.parse(rss_url)
if feed.bozo == 0:
print("SSL certificate validation successful.")
else:
print("SSL certificate validation failed.")
print("Error details:", feed.bozo_exception)
I receive
*SSL certificate validation failed.
Error details: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)*
Now I found hundreds of old articles reporting issues about MacOs and Feedparser most of them resolving with installation or re-installatino of certifi.
Because the machine is new, no compatibilities issues, is there an exhaustive step by step for the latest versions of the Mac? Or can you point me to the right documentation?
PS: The same steps on a Windows 11 machine work correctly.