Check Python Interpreter Version

Gabriel9999

Member
Joined
Mar 12, 2019
Messages
38
Reaction score
4
Credits
130
Are there any way to check the Python interpreter version without entering the Python shell or writing Python script?
 


Vrai

Well-Known Member
Joined
Mar 16, 2019
Messages
1,042
Reaction score
975
Credits
3,915
You should be able to see it with your package manager.
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,004
Reaction score
684
Credits
5,037
python -V (uppercase)
In some case python3 -V or python3.8 -V
 

Vrai

Well-Known Member
Joined
Mar 16, 2019
Messages
1,042
Reaction score
975
Credits
3,915
python -V (uppercase)
That does it! I knew there must be a way :)
Just typing "python" on the command line will reveal the version but that also invokes the 'python shell' which the OP did not want.
Thanks for the tip @dos2unix
 

Vrai

Well-Known Member
Joined
Mar 16, 2019
Messages
1,042
Reaction score
975
Credits
3,915
Python with a lowercase -v doesn't really work that well. Also, it goes into a python shell session which the OP did not want.

Python with an uppercase -V works perfectly without entering the python session.

or python3 -V
or python2 -V

At least that is how it works on Linux Mint 19.3 Tricia
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top