1

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).

xnx
  • 24,509
  • 11
  • 70
  • 109
  • I'm not sure it's fair to vote to close this question because it is "not about programming or software development". Python is a programming language and requests is a library of that language, which I can't use because of some configuration problem I'd like help with. – xnx Jun 25 '23 at 17:13

0 Answers0