Skip to content
Advertisement

Find full path of the Python interpreter?

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

Advertisement

Answer

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

import sys

print(sys.executable)

which is now documented here

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement