Which version of Python do I have installed?

485

I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter?

I was thinking of updating to the latest version of Python.

This question is tagged with python version windows-server

~ Asked on 2012-01-18 21:43:13

The Best Answer is


646

python -V

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

--version may also work (introduced in version 2.5)

~ Answered on 2012-01-18 21:45:51


137

Python 2.5+:

python --version

Python 2.4-:

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

~ Answered on 2012-01-18 21:45:52


Most Viewed Questions: