How to Check Python Version in Linux, macOS, and Windows?

Photo of author

By admin

Guido Van Rossum discovered Python in 1991 and it is widely respected as a programming language. The Python language contains a wide variety of versions, which are released on a regular basis in an organized manner. Because of its wide use, you may also find that some applications are dependent on Python in order to run accurately.

It provides many inbuilt libraries that help the user to use them effectively and reduce the amount of coding required to accomplish any task. The Python language is used primarily to create websites, applications, and to analyze data. Python’s two most popular versions are Python 2.7X and Python 3.8X. Both versions have their own distinct features, for instance, Python 2.7X is reliable when using a Python library.

You can run Python on a variety of operating systems including Windows, Mac OS, and Linux. There is a different Python version in each of them. So, if you are keen to find the installed version of Python on your system, follow the steps below.

Steps to Check the Python Version in Windows:

In order to check the latest version of python one can easily follow the below steps:

  • First of all type the command prompt in the search option of your computer.
  • Then open the command prompt and check the version of python.
  • You can type the command “python –version” in order to check the version.
  • If python is already installed then it will return the version like 3.9.0, 3.7.0 etc.
  • Let us see it with the help of an example.

You can type the following command on your command prompt:

C:\Users\Acer>python –version

Then you have to press enter and it will return the version of python installed on your computer.

Python 3.9.0

There is one more method to check the installed version of python on your computer. You can also use the search function of Windows in order to check the installed version of python on your computer.

To start searching, simply press the Window key and type Python. Now, the system will check if it exists or not and return any matching results.

It will return a result like:

Python 3.9.0(64 bit)

It will also return the processor of the system whether it is 32 bit or 64 bit. Hence, these are essential and simple steps to check the Python version on your Windows system.

Steps to Check Python Version in Linux:

Linux is one of the most widely used and supported operating systems. This is an open-source operating system. It is an operating system similar to Unix. Python comes pre-installed on many Linux operating systems. Thus, you can check if Python is pre-installed. If it is installed then you can simply check its version and if it is not you can download it from its official website python.org. You can then install the latest version, which is 3.9.0 for Linux at the moment.

In order to check the latest version of python on Linux, one can follow the following steps:

  • First of all you need to open the terminal window in Linux. In order to open the terminal you can follow the following steps:
    • You can press Ctrl+Alt+T Ubuntu or you can press Alt+F2 and then type in gnome-terminal.
    • After this, you can press enter and your terminal will open.
  • Then on terminal type python –version in order to check the version installed on the Linux operating system.
  • Let us take an example to understand this:

You can type the following command on your terminal in order to check the version of python:

~$python –version

Then you have to press enter and it will return the version of python installed in Linux.

Python 3.9.0

So, in this way, one can easily check the version of python installed in Linux.

Steps to Check Python Version in Mac:

Mac Os is designed by the computer company Apple. The software is very easy to use. Since its introduction in 1984, Mac OS has introduced a variety of new features. It includes various features such as network browsing, file sharing, and more.

If python is not installed on the system, you can easily download and install it on your system from its official website. If it is already installed on the system then you can check the version of python with the help of the following steps:

  • First of all you have to open the terminal in order to check the version of python installed. You can open the terminal in Mac Os by following the below-mentioned steps:
    • You have to click on the launchpad icon which is present on the Dock and then type terminal in the search option and then click the terminal option.
    • Then type python –version on the terminal in order to check the latest version of python installed on your operating system.
  • Below example will help to understand it better;

You can check the following command on the terminal to check the version of python:

Acer-Python: ~ user$ python –version

After this press enters to get the version of python installed. It will return the version of python like:

Python 3.9.0

So, in this way you can check the version of python installed on your computer. It is very easy to check and you can reinstall python’s latest version from its official website if your system is compatible with it.

In a nutshell,

In this article, we discussed various ways to check the version of python installed in different operating systems like Linux, Windows, and Mac. It is very easy to check this on any operating system. You just have to type the command in the terminal and it will return the version installed on the system of python. The operating system plays a main role to connect the hardware to software and without it, we cannot use the system.

Every operating system like Windows, Mac, or Linux updates its versions and come up with new and improved versions from time to time, Like the latest version of windows is Windows 10, the latest version of Linux is 15.12.12, the latest version of Mac Os is 11.0 and it is also known as Big Sur. Just like that, every programming language also releases its new and updated version with more functionality and features.

Conclusion

The best way to get the most out of your system is to update it with the latest versions. Your PC should also be compatible with the latest versions, as many of the latest versions require special characteristics such as the processor. Accordingly, your system must also be installed with the appropriate version.

Leave a Comment