Before we see how to install Python using Mac Terminal, you should be aware that all versions of macOS are shipped with at least one version of Python.
You can verify that you running the below command.
Check if Python is Installed using Terminal
If the Mac has Python 2.x installed.
python --version
Python 2.7.1
If the Mac has Python 3.x installed.
python3 --version
Python 3.11.4
Note: If somehow Python is not installed on your Mac you will see an error like,
Installing Python on Mac using Terminal
- Make sure Homebrew is installed on your Mac.
brew --version Homebrew 4.1.4If you get an error "command not found: brew", then first install brew using Terminal by following the below tutorial.

Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!