Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace.
There are several ways of installing Python on Mac. I strongly recommend instead using a package manager like Homebrew to manage all your dependencies going forward.
1. Install Python from official website
Step 1: Navigate to https://www.python.org/downloads/
Step 2: Click on “Download Python”
Step 3: Open Downloaded file and follow steps.
2. Install Python using Homebrew
Step 1: Check Python version.
$ python -V
Step 2: Install Xcode
$ xcode-select --install
Step 3: Install Home-brew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 4: Confirm Homebrew installed successfully
$ brew doctor
Step 5: Install Python
$ brew install python3
Step 6: Check correct version is installed
$ python3 --version