How to install Python on macOS

ZeroesAndOnes
3 min readJan 25, 2022

In this article I will demonstrate how to install Python 3.10.1 on macOS

1 — Install Homebrew

Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple’s operating system, macOS, as well as Linux.

To install Homebrew follow these steps:

  1. Open a Terminal
  2. In your Terminal type the following command and hit enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

3. Follow the instruction in your terminal

Once Homebrew has been installed successfully we will need to install ‘pyenv’.

2 — Install pyenv

pyenv lets you easily switch between multiple versions of Python. It’s simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.

In the Terminal type the following command to install pyenv:

brew install pyenv

The installation of pyenv might take few minutes to complete. Once the installation is complete you will then be able to install any Python version you would like.

3 — Use pyenv to Install Python or Update Your Python Version

--

--

No responses yet