What are ways of installing Python 3?

Solution 1:

As you already seem to have Homebrew installed, a simple

brew install python

should do. It will put python3 into /usr/local/bin so it shouldn't lead to any conflicts with the default installation.

PS: This is just for installing Python 3 though, not sure it solves your OpenSSL error.

Solution 2:

Just download the MacOS .pkg installer from here:

https://www.python.org/downloads/

Python3 installed this way contains its own version of OpenSSL, instead of the deprecated Apple-bundled libraries that come with python2.7. From the ReadMe:

This variant of Python 3.8 includes its own private copy of OpenSSL 1.1.1. The deprecated Apple-supplied OpenSSL libraries are no longer used.

Then invoke python with python3 command, and use pip3 for installing additional libraries.