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.
JavaScript
x
4
1
import sys
2
3
print(sys.executable)
4
which is now documented here