Home > Software engineering >  How to install Python 2 on macOS 12.3
How to install Python 2 on macOS 12.3

Time:04-05

macOS 12.3 update drops Python 2 and replaces it with version 3:

https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes

Python Deprecations Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)

I understand we need to migrate to version 3, but in the meantime we still need version 2. Homebrew does not seem to have it anymore:

brew install [email protected]
Warning: No available formula with the name "[email protected]". Did you mean [email protected], [email protected], [email protected], [email protected] or python-yq?

brew install python2
Warning: No available formula with the name "python2". Did you mean ipython, bpython, jython or cython?

What gives?

CodePudding user response:

You can get any Python release, including the last Python 2, from the official download site:

https://www.python.org/downloads/release/python-2718/macOS 64-bit installer

CodePudding user response:

A bit more relevant information. It was removed due to the fact that macOS remove the support of python2, and there is an open issue to remove all the python2 formulae as well.

Instead of using python official installer, I would suggest using pyenv, which is easier to manage multiple python versions in your local.

  • Related