How to Check Your Python Version
Share
It’s good to know what version of Python you’re running. Sometimes you may need a specific version to support an application. To check which version you currently have, we’ll be using command line.
tl;dr
python --version
or
python3 --version
1 – Check Python version on MacOS
MacOS users can verify their Python version through the Terminal application. To launch Terminal, open Finder, go to Applications, choose Utilities, and select Terminal.
Run the following command to retrieve your current version of Python.
python --version
If you’ve installed Python 3 alongside the system Python, the command is usually python3
and you can check the exact version using:
python3 --version
2 – Check Python version on Windows 10
Windows 10 users will need to use Windows PowerShell to check the Python version. To launch Windows PowerShell, go to the Start Menu and type powershell
. Select it from the list of applications.
Type the following command and press Enter to find your current Python version.
python --version
3 – Check Python version on Linux
If you’re using a Linux-based OS, this includes Raspberry Pi users, you can use the Terminal application to check your Python version. To open Terminal, press Ctrl + Alt + T.
Type this command into the Terminal window and press Enter. This will return info containing your current Python version.
python --version