check where python is installed code example
Example 1: get python directiory
import sys
print('\n'.join(sys.path))
Example 2: how to find where python is located
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
import sys
print('\n'.join(sys.path))
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'