How to Check Your Python Version

You must know how to check your Python version. You don’t want to be running an old version unintentionally, 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 command:

$ 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 follow the steps on installing Python 3.

Share this