Python Installation on macOS

To install Python on your computer you must have Homebrew installed, which is a package manager.

Homebrew installation Link to heading

To install Homebrew you must open the terminal that you will find in the application search engine and execute the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This command is also available on the official Homebrew website

Python installation Link to heading

After installing Homebrew, type the following commands in your terminal:

Step 1 Link to heading

Run the installation command:

brew install python3

Step 2 Link to heading

Check the installation and the installed python version.

python3 --version

Step 3 Link to heading

Run python in terminal

python3

Now you can program with python in your console and to exit press ctrl+D.

We recommend that you research code editors so that you can choose the one you prefer.

<< Installing Python on Windows Hello World >>