On my machine with macOS 14.2.1 Sonoma, I found more than one python3. I'm not sure any "came with" Sonoma. First, in a terminal, which python3
returns '/opt/homebrew/bin/python3'. I looked in /usr/bin/ and found a python3 there, too. Using /usr/bin/python3 -h
gave me too much info but showed a path indicating it was installed with Xcode.
Here's a way to get the version: in a terminal, simply type the name of the python you want examine (this starts the python REPL - use Ctrl-D to exit). It will tell you about itself. I did that for the two pythons I found, and the one from homebrew was Python 3.11.6, and the one in /usr/bin was Python 3.9.6. If you ask homebrew to uninstall python, it will uninstall the one in its directory. Note that, at least on my system, only python3 shows up, not python or python2.
Added: Homebrew will uninstall the Python in the homebrew directory. This is not the system Python. The main point of homebrew is to add (and remove if necessary) software without messing with what the system uses. And as far as I remember, your macOS, Ventura, did not come with a system Python. Is there something else in this picture - such as another installation that depends on Python - that leads to your concern?
More: Thanks to everyone for your followup comments and corrections ;) I think my post and its comments don't need further work. I did give the OP correct information amid reproducing how I found the answers on my system, and by now others have much more succinctly addressed the main points: homebrew won't mess with system stuff; Ventura did NOT come with any "system python"; find the version of python(s) with python3 -V
, and location path info with python3 -h
.
brew install hidapi
fails to import => https://stackoverflow.com/questions/77732954/ – gatorback Dec 30 '23 at 16:26