Networking-Forums.com

Professional Discussions => Programming Goodies and Software-Defined Networking => Topic started by: nikolaymartin on April 27, 2020, 09:07:39 AM

Title: Check Python Interpreter Version
Post by: nikolaymartin on April 27, 2020, 09:07:39 AM
Are there any way to check the Python interpreter version without entering the Python shell or writing Python script?
Title: Re: Check Python Interpreter Version
Post by: Otanx on April 27, 2020, 09:11:41 AM
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

Title: Re: Check Python Interpreter Version
Post by: edizgeorgi on April 28, 2020, 07:52:33 AM
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
Title: Re: Check Python Interpreter Version
Post by: Otanx on April 28, 2020, 08:34:16 AM
Make sure those are capital V. Lowercase -v is verbose mode. -V is the same as --version.

-Otanx