How to Check Your Python Version

It's important that you know how to check your Python version. You don't want to unintentially be running an old version, even though you just installed the latest! This simple command works on all operating systems, including Windows, Linux, and MacOS. Assuming you have Python installed, you can check your current Python version with the following command1:

$ python --version
Python 2.7.16

Hopefully, yours says something like 3.7.x or even higher. But if it says 2.7.x (or lower), don’t worry just yet. On many systems, both versions of Python are installed. Usually, Python 2 runs when you enter python and Python 3 when you enter python3.

Try it:

$ python3 --version
Python 3.7.6

If your output looks similar, congratulations. You already have Python 3 installed! If not, please following the steps on installing Python 3.

  1. You don't enter the $ sign, that's the command promp on Unix systems 

If you liked this page, please share it with a fellow learner: