How to Check Python Version in Windows / Linux / MacOS in CMD?

Today, We want to share with you how to check python version in cmd.In this post we will show you update python version, hear for change python version we will give you demo and example for implement.In this post, we will learn about How To Check Laravel Version And Configuration with an example.

Find python version on windows/Linux/MacOS command line

Python is a powerful programming language, thus it’s important to understand its different versions. Also here you can Check Python Version in Windows / Linux / MacOS.

Check Python Version Mac (Exact Steps)

There are the main 4 steps to check the Python version on your Mac operating system.

  1. first of all Press CMD + Space to open Spotlight.
  2. And then Type CMD “terminal” and press enter.
  3. Execute/RUN command: type python --version or python -V and press enter in keyboard.
  4. and last step to The Python version appears in the next line below your command.
Read Also:  AngularJS Confirm Password Validation Example

How to Check Python Version in Linux?

Type CMD “terminal” and press enter.

python ––version

How to Check Python Version in Windows?

Open Windows Powershell, and enter the following:

python ––version

How to Check Python Version in MacOS?

And then Type CMD “terminal” and press enter.

python –version

How to Check Python Version in Script?

Use the following Python source code to check current for the correct version of Python:

import sys

if not sys.version_info.major == 3 and sys.version_info.minor >= 6:

    print("Python 3.6 or higher is required.")

    print("You are using Python {}.{}.".format(sys.version_info.major, sys.version_info.minor))

    sys.exit(1)

I hope you get an idea about check for the version of Python installed in several different operating systems..
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.