-3

A new MacBook was acquired with Ventura last May. I immediately began to install a list of apps via homebrew.

When I unboxed the Mac, I did NOT check to see if Apple outfitted it with Python (be it version 2 or 3). I would think and will assume that Apple provided ("system") python in Ventura would be version 3, as python2 was retired in 2020 well before Ventura's release.

I believe (and seek examination of said beliefs) the that:

  1. Apple outfits MacOS with a "system python" since at least BigSur or newer.
  2. Apple outfits Ventura with python
  3. In Ventura the system python is found at /usr/bin/python3

In How to confirm MacOS "system" Python version, I am receiving conflicting information as the question in the title. Ideally, responses would be able provide confirmation from an authoritative website (i.e. Apple or similar credible source) or proper experiments.

I hope it is obvious that it is not practical buy a new Mac to test a hypothesis, nor is it practical reinstall MacOS.

If there is any credible source that debunks said beliefs 1) 2) or 3), that would also be appreciated. Thank you

My Default Python configuration

user@MacBook-Pro scripts % which python3 /usr/local/bin/python3

user@MacBook-Pro scripts % ls -l /usr/local/bin/python3 lrwxr-xr-x 1 user admin 40 Oct 11 20:46 /usr/local/bin/python3 -> ../Cellar/[email protected]/3.11.6/bin/python3

gatorback
  • 3,031
  • 8
  • 40
  • 57
  • Which practical problem are you trying to solve here? if this is still about https://stackoverflow.com/questions/77732954/, why not focus on that and fix your Homebrew python install? – nohillside Dec 31 '23 at 13:30
  • @nohillside The issue here is that I would like more certainty that said beliefs are correct or for an authoritative source to correct said beliefs. My Mac has many Python interpreter version and looking to reduce the quantity.
    If there is no "system python" then this is important to know. Thank you for your previous insightful comments on my prior questions
    – gatorback Dec 31 '23 at 13:46
  • 1
    It is import to achieve what? – nohillside Dec 31 '23 at 13:47
  • Reducing the number of python interpreters so as to simplify the problem solving approach to the issue of solving hidapi via homebrew. Said beliefs are the starting point of reducing the quantity of python interpreters: I understand that I need to be very careful so as to avoid damaging MacOS by altering the its system python. The debate over the existence of system python has caused me to seek examination of beliefs – gatorback Dec 31 '23 at 13:53
  • 1
    Your hidapi problem comes from Homebrew Python 3.10 accessing 3.11 paths. If you would focus your question on this, people could help you to solve that (easily). – nohillside Dec 31 '23 at 14:02

1 Answers1

1

It appears Python is not installed with Ventura, as I learned via this post (in the notes):

How to confirm MacOS "system" Python version

“@SteveM No Ventura does not come with a system Python - you get /usr/bin/python3 you have to install Xcode – mmmmmm“

Reference link: https://discussions.apple.com/thread/254320722?sortBy=best

“Correction to my OP: python3 is not included in Ventura, but it can be added by installing the command-line tools with: xcode-select --install (https://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/), and after installation, it has the benefit of being updated with macOS updates’

SteveM
  • 718
  • 1
  • 7
  • @SteveM Thank you for the response. It is the comment interactions in How to... Python Version between SteveM and mmmmmm that gave me pause to question my said beliefs. I am seeking a more 'rigorous' examination of the subject matter. – gatorback Dec 31 '23 at 13:40
  • @gatorback It is the correct answer though. /usr/bin/python3 is a stub which points (once Xcode is installed) to whatever version of Python which is bundled with Xcode. – nohillside Dec 31 '23 at 13:46
  • @nohillside This is good: belief #3 is not correct because /usr/bin/python3 is a pointer that may or may not point to a "system python". Would be good to know if & where a "system python" is located. – gatorback Dec 31 '23 at 14:01
  • @gatorback it doesn‘t matter in your case. You run a Homebrew installed 3.10 while the library is installed for 3.11. This has nothing to do with whatever macOS installs. – nohillside Dec 31 '23 at 14:05
  • @gatorback TIL (actually YIL ) there is no ‘system’ Python, only user installed Python(s). Thus your worry about removing the ‘system’ Python is unfounded. – SteveM Dec 31 '23 at 15:36
  • @SteveM. That's good to know: that's one less thing I can bork. – gatorback Jan 01 '24 at 13:09