How to install Python 3 in MacOS

This tutorial will show you how to install Python 3 on MacOS

Install homebrew #

Homebrew is an utility to install packages to their own directory and then symlinks their files into /usr/local.

To install homebrew, open terminal and run this below command:

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

Install Python using homebrew #

To install Python using homebrew, run this command in terminal:

brew install python

To confirm Python is installed:

python -V

if it doesn't work, you may change python to python3 such as:

python3 -V

It should display something like this:

Python 3.9.2

Congratulation. You have Python 3 installed in your MacOS

You now can use pip to install packages

pip3 install Pillow numpy imageio imageio-ffmpeg pydub moviepy

Tags:

Python