The fastest way to check your Python version
Open Terminal on your Mac and type python3 --version, then press Enter. The output will show you the exact version number — for example, "Python 3.11.5" or "Python 3.9.2". This is the most direct method and works on any Mac.
If you have an older Mac or installed Python a different way, you might also have python (without the 3) on your system. Type python --version to check that separately. Many Macs come with Python 2 pre-installed, which is now outdated, so you will likely see a much older version number if this command works at all.
The reason you need to know your version is that different Python versions have different features and different libraries available. If you are following a tutorial or trying to use someone else's code, you need to know whether your version will run it.
Key Takeaways
- Type python3 --version in Terminal to see your Python 3 version when ready.
- Your Mac may have both Python 2 and Python 3 installed; check both with python --version and python3 --version.
- Terminal is built into macOS and found in Applications > Utilities > Terminal.
- Different Python versions run different code, so knowing your version matters before you start a project.
Opening Terminal on your Mac
Terminal is the process where you type commands directly to your computer. On any Mac, you can open it by pressing Command + Space, typing "terminal", and pressing Enter. Or navigate to Applications, then Utilities, then double-click Terminal.
When Terminal opens, you will see a window with a prompt that looks like your username followed by a dollar sign or percent sign. This is where you type commands. The cursor will be blinking, ready for input.
Understanding the version number format
Python version numbers follow a pattern: major.minor.patch. For example, in "Python 3.11.5", the 3 is the major version, 11 is the minor version, and 5 is the patch version.
The major version (3 versus 2) is the biggest difference — Python 2 and Python 3 are not compatible with each other. The minor version (like 9, 10, or 11) matters less for most beginners, but some libraries only work with certain minor versions. The patch version (the last number) is usually just bug fixes and security updates.
If you see "Python 2.7.x" when you type python --version, that is the old version that Apple included with older macOS systems. It is no longer supported, and most new code will not run on it.
What to do if Python is not installed
If you type python3 --version and Terminal says "command not found", Python 3 is not on your Mac yet. You will need to install it before you can use it.
The most common way to install Python on Mac is through Homebrew, a package manager that handles downloads and setup for you. If you do not have Homebrew, you can also read Python directly from python.org and run the installer like any other Mac process. Both methods will add Python to your system so that the version check command works.
Checking where Python is installed
If you want to know the actual file location of Python on your Mac, type which python3 in Terminal. This will show you the path — for example, "/usr/local/bin/python3" or "/opt/homebrew/bin/python3". The path tells you whether Python came from Homebrew, from the official installer, or from somewhere else.
This matters if you are troubleshooting why a program is not working or if you have multiple Python installations on the same Mac. Different installation methods put Python in different locations, and sometimes your computer uses the wrong one by accident.
Checking Python version inside a script
If you are writing Python code and want to know what version is running it, you can add a check inside your script itself. Type or paste this into a Python file:
import sys print(sys.version)
When you run that script, it will print out the full version information, including the version number and the build details. This is useful if you are sharing code with someone else and want to make sure they are using a compatible version.
Frequently Asked Questions
Why do I see two different Python versions when I check?
Your Mac may have both Python 2 and Python 3 installed. Python 2 often came pre-installed on older Macs, while Python 3 is what you probably installed yourself or what came with a development tool. They are separate programs, so checking python --version and python3 --version will give you two different answers.
Does my Mac come with Python already?
Older Macs (before 2022) came with Python 2 pre-installed, but Apple removed it from newer versions of macOS. If you have a recent Mac and type python3 --version, you will likely see "command not found" unless you installed Python yourself.
What if the version number looks really old?
If you see Python 2.7 or an early Python 3 version like 3.6, your installation is outdated. New code and libraries often require newer versions. You can update by downloading a fresh installer from python.org or using Homebrew to upgrade.
Can I have multiple Python versions on the same Mac?
Yes, and many developers do. You can have Python 3.9, 3.11, and 3.12 all on the same computer. When you type python3 --version, you will see whichever one is set as the default, but you can specify a different version when you need it.