How do I find the full path of the currently running Python interpreter from within the currently executing Python script?
See How do I check which version of Python is running my script? if you are specifically interested in the version of Python for the currently running interpreter – for example, to bail out with an error message if your script doesn’t support that Python version, or conditionally disable certain modules or code paths.
sys.executablecontains full path of the currently running Python interpreter.which is now documented here