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.4
If you get an error "command not found: brew", then first install brew using Terminal by following the below tutorial.
- To install Python, run the below command on the Terminal.
brew install python
![How to install Python using Mac Terminal How to install Python using Mac Terminal](https://code2care.org/howto/install-python-using-mac-terminal/images/How to install Python using Mac Terminal.jpg)
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- Fix: grunt: command not found (Mac/Windows)
- AppleScript Example with TextEdit
- How to copy Password of Wifi on your Mac
- Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)
- How to check if a port is in use using terminal [Linux or macOS]
- Cut, Copy and Paste Keyboard Shortcuts on Mac Keyboard
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to Remove Widgets from macOS Sonoma 14 Desktop
- Turn off Auto-Capitalization on macOS Ventura 13
- How to Go To /usr/local/bin on Mac Terminal?
- How to Open TextEdit on Mac
- Mac: How to Open Android Studio from Terminal
- How to change the default location of Mac Screenshot
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to install homebrew (brew) on M1 Mac
- Must Know Homebrew Commands for Mac/Linux Users
- Steps to Uninstall Roblox on Mac (macOS)
- How to change the System Settings Sidebar icon size Mac Ventura 13
- How to set Out Of Office (OOO) on Outlook for Mac [Updated 2023]
- Trigger Notification Center Message using Mac Terminal Command
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools
- How to Install Rust Language on Mac (macOS)
- How to minimize all Windows in Mac
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to make TextEdit the default text Editor on Mac
- How to run Gradle build in offline mode - Gradle
- [Fix] Microsoft Windows OneDrive 0x8007018b Error Code - Windows
- List of jar files for Jax-ws (SOAP) based Java Web Services - Java
- Manually Throw an Exception in Python (raise:) - Python
- import servlet API to eclipse project (javax.servlet cannot be resolved error) - Java
- Bash Command to Check Python Version - Bash
- How to install pip on macOS using terminal command [Python] - Python
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source - SharePoint