The Python Oracle

Which version of Python do I have installed?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Over Ancient Waters Looping

--

Chapters
00:00 Question
00:27 Accepted answer (Score 712)
00:43 Answer 2 (Score 163)
00:59 Answer 3 (Score 150)
01:16 Answer 4 (Score 33)
01:32 Thank you

--

Full question
https://stackoverflow.com/questions/8917...

Accepted answer links:
http://docs.python.org/using/cmdline.htm...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #version #windowsserver

#avk47



ACCEPTED ANSWER

Score 761


To check the version of one's Python's Software version, one should use the following code in command prompt:

python -V

Reference: http://docs.python.org/using/cmdline.html#generic-options




ANSWER 2

Score 188


In a Python IDE, just copy and paste in the following code and run it (the version will come up in the output area):

import sys
print(sys.version)



ANSWER 3

Score 159


Python 2.5+:

python --version

Python 2.4-:

python -c 'import sys; print(sys.version)'



ANSWER 4

Score 34


At a command prompt type:

python -V

Or if you have pyenv:

pyenv versions