How to Check Your Python Version

Not sure what version of Python you’re running? Time to find out!
Ash Ash (362)
2 minutes

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.


python --version


python3 --version
Posted in these interests:
h/python67 guides
h/code69 guides

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

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

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
John John (304)
5 minutes

Vim is amazing. Well, Python is doing all the work, but I still like Vim. Learn how to format JSON in Vim like a pro with this short guide! tl;dr Paste your json, and run this in vim normal mode. :%!