Mac OS Monterey Python Version?

Could someone tell me the default version of Python, installed with Mac OS Monterey? The one symlinked from /usr/bin/python to /System/Library/Frameworks.

For anyone who has Mac OS Monterey installed, it's just a case of opening up Terminal and running 'python --version'.

There is a tool I use that may stop working if the system Python version changes.

Python 2 is version 2.1.18 and Python 3 is version 3.8.9

A new macOS Monterey install shows

user@mbp16 ~ % python --version
Python 2.7.18

user@mbp16 ~ % python3 --version
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.

After a fresh install you'll have the following:

$ python --version && which python
Python 2.7.18
/usr/bin/python
$ python3 --version && which python3
Python 3.8.9
/usr/bin/python3

An update on realpython.com/intro-to-pyenv/  I had issues with pyenchant not being able to find enchant C library when I used pyenv installer as suggested in this link. However, when I used brew install for all packages including pyenv, pyenv-virtualenv - I was able to have multiple python virtual environments on 2.7.18, 3.9.9 on latest Monterey using M1 silicon 14" pro.

For default Python 3.8.9, I am seeing build errors for pyenv install 3.8.9 command:

pyenv install 3.8.9

python-build: use openssl@1.1 from homebrew

python-build: use readline from homebrew

Downloading Python-3.8.9.tar.xz...

-> https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tar.xz

Installing Python-3.8.9...

python-build: use readline from homebrew

python-build: use zlib from xcode sdk



BUILD FAILED (OS X 12.0.1 using python-build 20180424)



Inspect or clean up the working tree at /var/folders/3f/l881d_r17qj_2q0kt5_6ll9h0000gn/T/python-build.20211123193623.70196

Results logged to /var/folders/3f/l881d_r17qj_2q0kt5_6ll9h0000gn/T/python-build.20211123193623.70196.log

Last 10 log lines:

checking size of _Bool... 1

checking size of off_t... 8

checking whether to enable large file support... no

checking size of time_t... 8

checking for pthread_t... yes

checking size of pthread_t... 8

checking size of pthread_key_t... 8

checking whether pthread_key_t is compatible with int... no

configure: error: Unexpected output of 'arch' on OSX

make: *** No targets specified and no makefile found.  Stop.

In another forum I learnt that 3.9.1 is the python supported for Monterey. Not the ones prior to it.

Version 3.10.0 is the latest and compatible version for macOS Monterey (macOS 10.9 or later)

[NEW] This updated installer provides a hotfix for a problem with the built-in Tk library when running on macOS 12 Monterey. See the ReadMe file for more information.

https://www.python.org/downloads/release/python-3100/

https://www.python.org/ftp/python/3.10.0/python-3.10.0post2-macos11.pkg (macOS 64-bit universal2 installer) :)

Run in folder :Applications/Python 3.10

  • Install Certificates.command
  • Update Shell Profile.command

If you get WARNING: You are using pip version 21.2.3; however, version 21.3.1 is available.

You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m pip install --upgrade pip' command.

type in Terminal :

"python3 -m pip install --upgrade pip"

Latest version available is from Jan. 14, 2022: 3.10.2 https://www.python.org/downloads/macos/ https://www.python.org/ftp/python/3.10.2/python-3.10.2-macos11.pkg = (macOS 64-bit universal2 installer)

:)

Latest version available is from Mar. 23, 2022: 3.10.4 https://www.python.org/downloads/macos/

https://www.python.org/ftp/python/3.10.4/python-3.10.4-macos11.pkg

= (macOS 64-bit universal2 installer)

macOS 12.3.1 Monterey (M1 Pro)

~% python --version
zsh: command not found: python

~% python3 --version
Python 3.8.9

~% python2 --version
zsh: command not found: python2

Yup – only python 3 on Monterey 12.4 that I can find:

~@icu-monterey ~ % python3 --version
Python 3.8.9
~@icu-monterey ~ % python2 --version
zsh: command not found: python2
~@icu-monterey ~ % ```

https://www.python.org/ftp/python/3.10.4/python-3.10.4-macos11.pkg

= (macOS 64-bit universal2 installer) = Universal is for Apple silicon too ! :)

update 2022-06_06 !

https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg

= (macOS 64-bit universal2 installer) = Universal is for Apple silicon too ! :)

Python 3.10.6 final

Release date: 2022-08-01

https://www.python.org/ftp/python/3.10.6/python-3.10.6-macos11.pkg

= (macOS 64-bit universal2 installer) = Universal is for Apple silicon too ! :)

I typed that (I have 12.5.1) & I get this: zsh: command not found: python

Came across this post/thread with a problem I'm having. I'm simply trying to run a .py script on macos Monterey 12.5.1, that I found online, to see why my current/active window I'm working in loses focus. When I go to run the script, it returns an error 'ImportError: cannot import name 'NSWorkspace' from 'AppKit'. Anyone know why appkit won't import in python3, and what I need to do to rectify this error? Thanks!

Python 3.10.7 final

Release date: 2022-09-06

https://www.python.org/ftp/python/3.10.7/python-3.10.7-macos11.pkg

= (macOS 64-bit universal2 installer) = Universal is for Apple silicon too ! :)

After install of the .pkg you get an folder Python 3.10 in Applications

Then : launch with Terminal

  • Install Certificates.command
  • Update Shell Profile.command

THATS ALL !

I installed 12.6 yesterday (October 4 2022) and ended up with 3.9.6 for python3. It broke my old python 3.8 applications.

Python 3.10.8 final

Release date: 2022-10-04

https://www.python.org/ftp/python/3.10.8/python-3.10.8-macos11.pkg

= (macOS 64-bit universal2 installer) = Universal is for Apple silicon too ! :)

Release details:

The macOS 13 SDK includes support for the mkfifoat and mknodat system calls. Using the dir_fd option with either os.mkfifo() or os.mknod() could result in a segfault if cpython is built with the macOS 13 SDK but run on an earlier version of macOS. Prevent this by adding runtime support for detection of these system calls (“weaklinking”) as is done for other newer syscalls on macOS.

Python 3.11.0 final

Release date: 2022-10-24

download: https://www.python.org/downloads/release/python-3110/

= (macOS 64-bit universal2 installer) = Universal is for Apple silicon too ! :)

After install of the .pkg you get an folder Python 3.11 in Applications

Then : launch with Terminal

Install Certificates.command Update Shell Profile.command

THATS ALL !

changelog: https://docs.python.org/release/3.11.0/whatsnew/changelog.html#macos

The macOS 13 SDK includes support for the mkfifoat and mknodat system calls. Using the dir_fd option with either os.mkfifo() or os.mknod() could result in a segfault if cpython is built with the macOS 13 SDK but run on an earlier version of macOS. Prevent this by adding runtime support for detection of these system calls (“weaklinking”) as is done for other newer syscalls on macOS.

general upgrade tutorial: https://www.codegrepper.com/code-examples/shell/pip+install+-%2A-upgrade

For those of you who simply want python 3 at python you can execute the following in Terminal:

$ ln -s `which python3` /usr/local/bin/python
$ which python
/usr/local/bin/python

ln -s creates a symbolic link from whereever python3 is into /usr/local/bin at python.

update 3.11.1 of dec, 6 -2022

https://www.python.org/ftp/python/3.11.1/python-3.11.1-macos11.pkg

Hello Everyone,

Is there a command that would update\upgrade MacOS Python on Monterey 12.6.3?

% python3 --version
Python 3.9.6
% 

Nope, I am not looking to download from python.org nor use pyenv nor brew because all of these options install yet another Python3 on a totally different directory path hence it duplicates an install. I would simply want to update\upgrade the current MacOS Python3.

Is it possible or has it been locked so that new version of Python3 do not hinder the ability for MacOS to operate?

update 3.11.3 of apr, 4 -2023

https://www.python.org/ftp/python/3.11.3/python-3.11.3-macos11.pkg

Documentation: https://docs.python.org/3.11/

Change log : https://docs.python.org/release/3.11.3/whatsnew/changelog.html#macos

for macOS 10.9 and later

update 3.12.2 of febr, 6-2024 for macOS 10.9 and later

https://www.python.org/ftp/python/3.11.3/python-3.12.2-macos11.pkg

Documentation: https://www.python.org/downloads/release/python-3122/

https://docs.python.org/3.12/

Change log : https://www.python.org/ftp/python/3.12.2/

  • Update macOS installer to use SQLite 3.45.1.

  • Update macOS installer to use OpenSSL 3.0.13

Mac OS Monterey Python Version?
 
 
Q