Dari Python :

>>> import sys

>>> print sys.version
2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]

>>> sys.version_info
(2, 5, 2, ‘final’, 0)

 

Dari Terminal :

$ python -c ‘import sys; print sys.version’
2.7.3 (default, Apr 20 2012, 22:44:07)
[GCC 4.6.3]

$ python -c ‘import sys; print sys.version_info’
sys.version_info(major=2, minor=7, micro=3, releaselevel=’final’, serial=0)

 

Sumber :  http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script