How to install Python 3 on Mac using homebrew

tldr; install brew; brew install python

Homebrew is a great installer for Mac and its main job is to make it easier to install packages.

Step 1: Download Homebrew here

"brew" hosts its package information here as “formulae“.

Step 2: Use brew to install the latest version of Python

$ brew install python --verbose

Now you can run python3 in your terminal

> python3

More details: So what happens when I run brew install?

When you run the command, brew will look for the package in the “formulae” list and run the installation script for the package.

Brew installs *all* packages into its own directory on your computer at  /usr/local/Cellar .

Take a look with $ ls /usr/local/Cellar.

After installation, brew creates a symlink which is basically a shortcut that will allow your system to run the new command > python3.

Leave a Reply

Your email address will not be published. Required fields are marked *