EN
Python - how to check Python version
3 points
In this article, we would like to show you how to check used Python version.
Quick solution (run the following command):
xxxxxxxxxx
1
python -V
Example output:
xxxxxxxxxx
1
Python 3.10.0
Screenshot:

There are available alternative methods that lets to print Python version:
This approach is equivalent for -V
.
xxxxxxxxxx
1
python --version
Example output:
xxxxxxxxxx
1
Python 3.10.0
Using this approach you can print version details too.
Note: this approach may not working same way in older Pythons (it can return just version for older Pythons).
xxxxxxxxxx
1
python -VV
Example output:
xxxxxxxxxx
1
Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]