How to check the version of the Python Interpreter?
As we all know what an interpreter is, and how important it is. We should also be aware of the fact that it is important to have knowledge of the version of the Python interpreter we are using, as many functions do not run on older versions, hence it should be up to date to use the latest features of Python smoothly.
Python is widely used in source coding and computer programming in many industries. It executes the interactive commands received by it.
How to check the version of Python?
Some methods used to check the version of Python are:
- Python -V command
- Python_version() function
- sys.version method
Before checking the version of the Python interpreter, it is necessary that your device should have installed it. To check it, execute the following command in the command prompt:
Python
If the terminal shown below appears then you have it installed on your device, and if you see any kind of error then first install Python from its official website.

Method 1: Using the “Python -V” command
It is one of the most commonly used commands to check the version of the Python interpreter. This is an inbuilt Python command.
The following steps are followed to check the version of the Python interpreter:
- First, open the command prompt.
- Then, execute the following command in it, and after pressing enter you will receive the current version of the Python interpreter:
Python -V
Output:

Method 2: Using the “Python_version()” function:
This is one of the methods to check the version of the Python interpreter. To use this function, the platform library has to be imported. This function can be used in both, the terminal and in IDLE.
The following steps are followed to check the version of the Python interpreter:
- First, open the command prompt or the IDLE.
- Then, if you opened the command prompt, type Python and press enter.
- Finally, at last, execute the following command in the terminal or IDLE:
fromplatform importPython_versionas pv
print("The version of current Python interpreter is:",pv())
Output:

Method 3: Using the “sys.version” method:
It is the last method to check the version of the Python interpreter, of the three we mentioned before. To use this method, the user has to import the sys library. Just like the “Python_version()” function, it can be used in both, the terminal and in IDLE.
The following steps are followed to check the version of the Python interpreter:
- First, open the command prompt or the IDLE.
- Then, if you opened the command prompt, type Python and press enter.
- Finally, at last, execute the following command in the terminal or IDLE:
importsys
print("The version of current Python interpreter is : ",sys.version)
Output:

Note: This method does surely give some additional details along with the version of Python interpreter.