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.

Read Also:  How to return view with flash message in Laravel 6?

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:  Move Laravel Project From localhost to live production server

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.

Read Also:  VueJS Global Constants Set and Get Variables

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Vue watch two dimensional Array and Object
  2. Read Also:  PHP Image Resize Script Example
  3. Read Also:  How to connect Bitbucket version control in cPanel to install and update a site?
  4. Read Also:  Simple Tooltip Component with CSS and Vuejs
  5. Read Also:  PHP Get Full URL PATH QUERY STRING
  6. Read Also:  PHP Whatsapp Rest API Send and Recieve WhatsApp Message
  7. Read Also:  How To Work With Laravel 6 Flash Messages?
  8. Read Also:  VueJS Global Constants Set and Get Variables
  9. Read Also:  PHP Get Full URL PATH QUERY STRING
  10. Read Also:  PHP Whatsapp Rest API Send and Recieve WhatsApp Message
CLOSEX