How do I find the full path of the currently running Python interpreter from within the currently executing Python script?
sys.executable contains full path of the currently running Python interpreter.
sys.executable
import sys print(sys.executable)
which is now documented here
1.4m articles
1.4m replys
5 comments
57.0k users