Python – Find full path of the Python interpreter

pathpython

How do I find the full path of the currently running Python interpreter from within the currently executing Python script?

Best Answer

sys.executable contains full path of the currently running Python interpreter.

import sys

print(sys.executable)

which is now documented here