Thus if you are or were dependent on Python 2.7.x for any particular reason, you’ll either need to update your programs for Python 3 compatibility, maintain an older deprecated Python 2.x release (which is possible with Homebrew, etc), or rewrite everything and move on to another language entirely. Developers should use Python 3 or an alternative language instead. Python 2.7 was removed from macOS in this update. This is found in the developer notes, listed under Deprecations: What happened to Python in MacOS?įor those who aren’t aware, Apple has been warning for a while now that Python would be deprecated from future macOS versions, and that time has finally arrived with macOS Monterey 12.3 onward.
We’re using aliases here in this example, but you can use a symbolic link linking /usr/bin/python3 to /usr/bin/python instead if you’d prefer to go that route. Keep in mind that in future versions of MacOS, Python 2.x will no longer be bundled. If you continue to have the original Python 2.7.x release installed on the Mac, it remains accessible and usable by specifying the full path, like so: This should be the same response as if you type, since the python command has been aliased to python3: Now you can confirm the alias worked by checking the python version: Hit Control-O and then Control-X to save the edit and then exit out of nano.Add the following alias at the bottom of the.From the Terminal, open zshrc in your text editor of choice, we’ll use nano for the sake of ease:.zshrc, but if you still use bash then you’d add the alias into.
We are assuming you’re using the default Zsh shell (or Oh My Zsh) and thus modifying.
#How to update python on mac to 3.9 how to
How to Make Python 3 the Default in MacOS
Again, you can also install it using the Python 3 installer, or even the MacAdmins Python release if you’d prefer. This will install the latest Python 3 release available through HomeBrew. If you haven’t installed Python 3 yet it’s easy to do so with a single homebrew command: If you already installed Python 3 on the Mac using the official Python installer from here or Homebrew, you can skip this section.