Tell HN: Python 3.6 on OS X requires a post-install step for SSL to work

https://news.ycombinator.com/item?id=13626273
by vosper • 9 years ago
2 2 9 years ago

I'm posting this as a PSA, because I just wasted a few hours (should have read the release notes in full) trying to resolve an "SSL: CERTIFICATE_VERIFY_FAILED" exception every time I requested a URL over HTTPS. All my Googling take me to promising-but-irrelevant StackOverflow threads. It turns out that on OSX Python 3.6 no longer uses the systems trusted certificates, so after install it has no certificates at all (except a hardcoded one for pip) and can't validate any SSL connections.

To fix this you need to run a command [0] included in the installer that will download and install the certifi package, which is a collection of trusted certificates. If I understand the release notes correctly you are also now responsible for making sure your certificates are up to date - the release notes recommend subscribing to the mailing list.

Personally, I think this sucks. It makes Python way less friendly to new users, and I don't want to be on the hook for keeping my certificates up-to-date. At the very least, the installer should run the post-install script automatically, so that SSL connections just work.

The ReadMe with more info lives at /Applications/Python\ 3.6/ReadMe.rtf

[0] /Applications/Python\ 3.6/Install\ Certificates.command

Related Stories

Loading related stories...

Source preview

news.ycombinator.com