How to check installed version of Python

How to check installed version of Python

Python is a widely-used programming language and it’s important to check which version of Python is installed on your system to ensure compatibility with other packages or to make sure you have the latest features.

One way to check the version of Python that’s installed is by using the command line. Open up the command prompt or terminal and type “python –version” (without quotes). This will show you the version of Python that’s currently installed on your system.

Another way to check the version of Python is by using Python code. Open the python environment and type import platform; platform.python_version(). This will print the version of Python that is currently installed.

It’s also possible to check the version of Python by running the command “python -V” in the command prompt or terminal.

In summary, there are several ways to check the version of Python that’s installed on your system. One way is to use the command line by typing “python –version” in the terminal or command prompt. Another way is by using Python code by importing platform library and using the function platform.python_version(). Lastly, you can check the version by running the command “python -V” in the command prompt or terminal.

 

In this Applied Machine Learning Recipe, the reader will learn: How to check installed version of Python.



Essential Gigs