If you have a Mac device that's running on macOS, you would already be shipped with Python preinstalled.
To check which version you have, all you need to do is open Terminal application and run the below command to know the version.
python --version
Python 2.8.1
If you have a newer version of macOS, then you will need to make use of python3 command or else you will get the error "zsh: command not found: python".
python3 --version
Python 3.11.4
List of Python Versions shipped with Macs
macOS Sonoma (14.x): Python 3.9.6
macOS Ventura (13.x): Python 3.9.6
macOS Monterey (12.x): Python 2.1.18 and Python 3.8.9
macOS Big Sur (11.x): Python 3.8.x
macOS Catalina (10.15): Python 2.7.x and Python 3.7.x
macOS Mojave (10.14): Python 2.7.x and Python 3.7.x
macOS High Sierra (10.13): Python 2.7.x and Python 3.6.x
macOS Sierra (10.12): Python 2.7.x and Python 3.5.x
OS X El Capitan (10.11): Python 2.7.x and Python 3.5.x
OS X Yosemite (10.10): Python 2.7.x and Python 3.4.x
OS X Mavericks (10.9): Python 2.7.x and Python 3.3.x
OS X Mountain Lion (10.8): Python 2.7.x and Python 2.6.x
OS X Lion (10.7): Python 2.7.x and Python 2.6.x
OS X Snow Leopard (10.6): Python 2.6.x
To update the version of Python, all you need to do is visit the official website for Python: https://www.python.org/downloads/
This will download the latest version of .pkg file that you can double-click to open and install using the instructions.
Using Homebrew
One other way to get the latest version of Python is by using the package manager homebrew.
Just run the below command in Terminalbrew install python
Note: You need not need to worry about the installation based on Intel/M1/M2 chip, brew will take care of it.
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
- How to show line numbers in Nano on Mac
- How to install Jupyter Notebook on macOS Sonoma
- How to Disable Remote Management using Mac Terminal
- Test internet speed using macOS Terminal command
- Docker Desktop needs privileged access macOS
- Google Search Hot Trends Screensaver for Mac OS X
- How to do calculations in Mac Terminal
- How to make TextEdit the default text Editor on Mac
- How to Show Full Website Address on Safari for Mac (Ventura/Sonoma)
- The Zsh Shell - Mac Tutorial
- Opening mac Terminal
- How to change the name of your Mac running on macOS Ventura 13
- How to find the Battery Cycle Count on macOS Ventura
- How to set an emoji as Zsh terminal prompt in macOS
- How to access Trash Folder using Mac Terminal Command
- macOS Ventura XCode Command Line Tools Installation
- Hide Bluetooth icon on Mac Menu Bar macOS Ventura 13
- How to run .sh file in Mac Terminal
- Terminal Command to get the list of available shells in macOS
- How to see Storage Information on macOS Ventura
- How to Go To /usr/local/bin on Mac Terminal?
- How to do screen recording on Mac
- How to Find File and Directory Size in Mac Terminal
- Open .bash_profile File in TextEdit using Terminal
- Remove Now Playing icon from macOS Big Sur Menu Bar
- MySQL : Error :1004 SQLSTATE: HY000 (ER_CANT_CREATE_FILE) Can't create file - MySQL
- How to Determine Android Studio Gradle Version - Android-Studio
- How to send SMS on Android Emulator - Android
- Spell check not working in Gmail : Mac OS X - Mac-OS-X
- Convert SQL to CSV in Notepad++ - NotepadPlusPlus
- zsh hello world example - Linux
- How to uninstall Visual Studio Code on macOS - MacOS
- Fix: pip install mysqlclient error: subprocess-exited-with-error - MySQL