Check Python Interpreter Version

Started by nikolaymartin, April 27, 2020, 09:07:39 AM

Previous topic - Next topic

nikolaymartin

Are there any way to check the Python interpreter version without entering the Python shell or writing Python script?

Otanx

What use case do you have for that? Just enter the shell and then quit() back out. However, there is a way: python --version

-Otanx


edizgeorgi

#2
You can use the Python command to get the Python interpreter version. For the default Python installation use
python -v         
OR for Python2
  python2 -v
Or Python3
python3 -v           

Reference: https://www.networking-forums.com/programming-goodies-and-software-defined-networking/check-python-interpreter-version

Otanx

Make sure those are capital V. Lowercase -v is verbose mode. -V is the same as --version.

-Otanx