sys.executable
contains full path of the currently running Python interpreter.
import sys
print(sys.executable)
which is now documented here
More Related Contents:
- How can I safely create a nested directory?
- Relative paths in Python
- How do I get the path of the current executed file in Python?
- Where is Python’s sys.path initialized from?
- How do I get the path of the Python script I am running in? [duplicate]
- Expand Python Search Path to Other Source
- How to refer to relative paths of resources when working with a code repository
- Test if executable exists in Python?
- PyCharm current working directory
- How can I find where Python is installed on Windows?
- Python list directory, subdirectory, and files
- How to configure Atom to run Python3 scripts?
- mixed slashes with os.path.join on windows
- Why use sys.path.append(path) instead of sys.path.insert(1, path)?
- Graphviz’s executables are not found (Python 3.4)
- Keras import error Nadam
- Unexpected python paths in conda environment
- Windows can’t find the file on subprocess.call()
- How to set working directory for projects in PyCharm?
- What is __path__ useful for?
- How should I write a Windows path in a Python string literal?
- How can I safely create a directory (possibly including intermediate directories)?
- Python: is the current directory automatically included in path?
- How do I use ‘~’ (tilde) in the context of paths?
- Import paths – the right way?
- Changing the directory where .pyc files are created
- Cannot find the file specified when using subprocess.call(‘dir’, shell=True) in Python
- Finding all paths/walks of given length in a networkx graph
- Python not able to open file with non-english characters in path
- How do I create a directory, and any missing parent directories?