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
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.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
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
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
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
Seems I had an old version of the commas line tools on my mac-mini (intel) that wasn't being updated with Software Update. I deleted /Library/Developer/CommandLineTools and reinstalled (xcode-select --install) and now python 3.9.6 is installed
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.
Yes, ask me how I know about multiple versions of Python.org and the script that I had been using to clean that up…
As it turns out, I was doing things with PySide6 (Qt6) and it does not support 3.11.0 yet. Fun stuff on the bleeding edge.
VikingOSX wrote:
Yes, ask me how I know about multiple versions of Python.org and the script that I had been using to clean that up…
Did you catch all the changes to $PATH that python made to .bash_profile?
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.
No .pysave file here on any of my Macs, 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.
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/
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?
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
Correction to my OP: 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
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.
Python 3.9.6 on Ventura w/Apple Silicon; 3.7.3 on Ventura w/Intel
Still at least a year behind the current Python 3.10.8 distribution. Sad.
3.11.0 is the current now.
Python3 now included with Ventura