What version of python is the one that I cannot uninstall
Solution 1:
MacOS comes with python2, which is installed in /usr/bin
.
From Catalina onward, macOS also comes with a 'stub' for python3, which is also in /usr/bin
.
The first time you run this, it will ask to install the Xcode Command Line Tools, which contain python3, if you don't have Xcode installed already.
/usr/bin
just contains the 'command': the libraries and meat of the installation is in /Library/Frameworks/Python.framework
. You can't delete the system pythons without doing all sorts of tricks, so if you can delete it, it's not the system one.
/usr/bin
is restricted to system software only. Third-party installations will be in /usr/local
, though I believe homebrew also uses /opt
.
So anything in /usr/local
will be a third-party python. The 'meat' of the package is usually installed in /Library/Frameworks/
. "If you can delete it, it's not system installed."
Unless you intend to install and use multiple pythons at the same time, I find using the python installer directly from https://www.python.org/downloads/ to be much easier than Homebrew, which seems to complicate matters. (Others may disagree.)