0 votes
1 view
in Python by (47.8k points)

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

1 Answer

0 votes
by (107k points)

For finding the full path of the Python interpreter you can use sys.executable which contains the full path of the currently running Python interpreter. Below is the code that shows how to use the sys.executable and get the full path in Python.

import sys

print(sys.executable)

image

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 18, 2019 in Python by Sammy (47.8k points)
0 votes
1 answer
asked Jul 11, 2019 in Java by Ritik (3.5k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...