I am having the problem described in this question, an CERTIFICATE_VERIFY_FAILED error when I use teh urllib or requests libraries. Running my Python installation's "Install Certificates.command" application doesn't work, however, I think because of this:
$ python -c 'import ssl; print(ssl.get_default_verify_paths().openssl_cafile)'
/usr/local/mysql/ssl/cert.pem
For some reason, Python's ssl library wants to look for the SSL certificates in my MySQL installation. I can fix things by creating a symlink:
sudo mkdir -p /usr/local/mysql/ssl/
sudo ln -s /Library/Frameworks/Python.framework/Versions/3.11/\
lib/python3.11/site-packages/certifi/cacert.pem /usr/local/mysql/ssl/cert.pem
But I'd like a better solution – any idea what I should be doing to fix this properly? I installed the official Python (3.11) release, then MySQL, and later had to install Homebrew (which I suspect has been up to its usual shenanigans).