

We’ll need to see where you’re starting from in order to get setup correctly.

If you’re setting up your Mac from scratch, my article Zero to Hero: Set Up Your Mac for Software Development will guide you through the whole process. However, if you require nuanced versioning or multiple versions of Python, check out my article on pyenv: Multiple version Python development on Mac. This is a good one-size-fits-all solution. You can follow it and give a star to support the maintainer.NOTE: In this opinionated story, I suggest that the “right” way of doing Python 3 on macOS is to have the latest version and to stay current with frequent updating. The GitHub page provides a good installation guide. You can install many versions of Python on the same computer and switch between versions depending on the project's requirements. Install with pyenvĪnother installation alternative is to use pyenv, a version management tool for Python. You can test that the installation succeeded by opening a new terminal and type python. Download Python 2 for MacOS.Īfter the download, install the software by following the installation guide. Go to the download link and select the MacOS version. Download and install Python 2Īt the moment I'm writing this, the latest version is 2.7.18. If you try to install Python 2 from Homebrew, it will not work because the package has been removed: Installation error of Python 2 using Homebrew.įortunately, you can get the latest version of Python 2 from the official download site. There are still many python scripts running on Python 2.7 that can't be upgraded for various reasons, so you might need to install it.

Starting version 12.3 of Mac OS Monterrey, Python 2 was removed from macOS, and developers are encouraged to use Python 3 or other programming languages. It is supported by major operating systems, especially MacOS, where version 2 was installed with the operating system by default. Python is a programming language widely used for building software and web applications.
