Dnaiel Dnaiel - 5 months ago 71
Python Question

macOS X weird python

short Q,

In a mac OS sierra terminal,

If I do:

whereis python

Then if I do:
it opens python 2.10

but if I execute
it opens python 2.7.8.

How can I know whereis python 2.7.8 and why whereis points to a different python version than the default one?

wim wim

You can run python and check the sys.executable.

>>> import sys
>>> sys.executable