DEV Community

Techno-101
Techno-101

Posted on

How to Check Python Version?

You can check the version of Python installed on your system using the command line or terminal. Here's how to Check Python Version:

Open a command prompt or terminal window on your system.

Type the following command and press Enter:

css
Copy code
python --version
or

Copy code
python -V
This command will display the version of Python installed on your system. For example, if you have Python 3.9.7 installed, the output will be something like:

Copy code
Python 3.9.7
If you have multiple versions of Python installed on your system, you may need to specify the version explicitly. For example, to check the version of Python 2.x, you can use:

python2 --version
or

Similarly, to check the version of Python 3.x, you can use:

python3 --version
or

Copy code
python3 -V
These commands will display the version number of the respective Python interpreter installed on your system.

For more check out the free online Python tutorial!

Top comments (0)