Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Python3 now included with Ventura

I was surprised to see that Python 3.9.6 is now included with Ventura (I don't recall python3 being included with Monterey)

MacBook Air, macOS 13.0

Posted on Oct 26, 2022 12:46 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 2, 2022 8:08 AM

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

22 replies

Oct 27, 2022 2:43 PM in response to VikingOSX

Still at least a year behind the current Python 3.10.8 distribution. Sad.


A year behind isn’t that bad, and understandable (raspberrypiOS also has 3.9.2) and as an infrequent python user, I prefer the distribution included with the command line tools.

Not a fan as how python.org handles macOS updates by not removing the prior versions and I’m left with multiple versions in my App Folder, and in Frameworks.

Oct 28, 2022 6:47 AM in response to VikingOSX

VikingOSX wrote:

I use Zsh and not Bash, though no changes were made to any Bash dotfile. I do see that in my .zshrc, the old reference to Python 3.10 remains, so I will have to change that.


bash, zsh, sh, whatever shell is used, python has to update the Path to include: /Library/Frameworks/Python.framework/Versions/3.10/bin for 3.10, and there should be a .pysave file somewhere as well.


Oct 28, 2022 8:38 AM in response to VikingOSX

VikingOSX wrote:

…and the Python 3.11.0 installation with the Python.org installer did not update any PATH statement. The old Python 2.7.* installers would enter a separate PATH statement in the dot files, but v3.* does not for me.


If it’s not 1st in the PATH, then how does python3 3.11 in Terminal 1) find it, and 2) run it instead of python3 in /bin/bash? Could be the python installer added it to  /etc/paths.d/

Nov 2, 2022 5:31 AM in response to Tony T1

I really do not know a lot about python, other than to use it to generate orthographic scenery for X-Plane, but I think that the only reason that python is there (in macOS) at all is that because the Apple developers do some things pythonish. For years Apple itself has refused to help people with concerns or issues that was terminal related unless they have changed lately. They would brag about how there was this terminal application out there, then turn their back on you when you asked for help. Of course out here, the Community was completely opposite.


I have not upgraded to Ventura, but is Python 2 still in it?

Nov 2, 2022 5:54 AM in response to danuke

I have not upgraded to Ventura, but is Python 2 still in it?


Python 2.7 is not included in Ventura.


Also, I must correct my initial post as python3 is not included in Monterey, 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

Nov 2, 2022 6:25 AM in response to Tony T1

If you're updating to python3, there is a python code conversion tool include with the command line tools (/Library/Developer/CommandLineTools/usr/bin//2to3)


Usage: 2to3 [options] file|dir ...

Options:
  -h, --help            show this help message and exit
  -d, --doctests_only   Fix up doctests only
  -f FIX, --fix=FIX     Each FIX specifies a transformation; default: all
  -j PROCESSES, --processes=PROCESSES
                        Run 2to3 concurrently
  -x NOFIX, --nofix=NOFIX
                        Prevent a transformation from being run
  -l, --list-fixes      List available transformations
  -p, --print-function  Modify the grammar so that print() is a function
  -e, --exec-function   Modify the grammar so that exec() is a function
  -v, --verbose         More verbose logging
  --no-diffs            Don't show diffs of the refactoring
  -w, --write           Write back modified files
  -n, --nobackups       Don't write backups for modified files
  -o OUTPUT_DIR, --output-dir=OUTPUT_DIR
                        Put output files in this directory instead of
                        overwriting the input files.  Requires -n.
  -W, --write-unchanged-files
                        Also write files even if no changes were required
                        (useful with --output-dir); implies -w.
  --add-suffix=ADD_SUFFIX
                        Append this string to all output filenames. Requires
                        -n if non-empty.  ex: --add-suffix='3' will generate
                        .py3 files.


Python3 now included with Ventura

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.