Table of Contents
This tip is about the how to check Python version on Windows, Mac and Linux. So read this free guide, How to check Python version on Windows, Mac and Linux step by step. If you have query related to same article you may contact us.
How to check Python version on Windows, Mac and Linux – Guide
Python is one of the most popular programming languages. And because of its amazing developer community, you can easily see that many different versions are released quite often. Currently, there are two most popular versions of Python, one is Python 2.7.x and the other is Python 3.8.x. Sometimes you need to work with the python library which only supports python 2.7 and sometimes we need to work with the python 3.x version but we have python 2.7 installed and we may find that our library does not support the installed version of python supports.
In this case, it is better to check the installed version of Python before downloading the necessary library. Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its built-in high-level data structures, combined with dynamic typing and dynamic linking, make it very attractive for rapid application development, as well as for use as a script or paste language to join existing components together.
Python’s simple, easy-to-learn syntax emphasizes readability and therefore reduces program maintenance costs. Python supports modules and packages, which promotes program modularity and code reuse. The Python interpreter and extensive standard library are freely available in source or binary format for all major platforms and can be freely distributed.
How to check Python version on Windows, Mac and Linux
Check Python version on Linux
Most modern Linux distributions come with Python pre-installed.
To verify the installed version, open a terminal window and type the following:
Check Python version on Windows
Most out-of-the-box Windows installations do not come with Python pre-installed. However, it is always good to check. Open Windows Powershell and type the following:
If you have Python installed, it will tell you the version number. Alternatively, use the Windows Search function to see which version of Python you have, press the Windows key to start a search and type Python. The system will return any results that match. Most likely, a match will show something similar to:
Or,
Check Python version on MacOS
If using a MacOS, check the Python version by typing the following command in the terminal:
The system will inform the version.
Final note
I hope you like the guide How to check Python version on Windows, Mac and Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.