How to find where Python is Installed on Windows?
Hi Guys,
I just installed Python 3.8 in window 10. How can I get the full path of install Python on my laptop? For example:
C:/opt/virtualenvs/python3.8
How can I find it?
-
P0
Pablo Humberto Arriola Agudelo Jul 31 2021
You can do as below with some lines of code:
import sys locate_python = sys.exec_prefix print(locate_python)
Hope it works for you.
-
y0
yaswanth Thamidallapati Jul 31 2021
I do as below and it worked for me.
import os import sys path = os.path.dirname(sys.executable) print(path)
-
D0
Deepak M Jul 31 2021
In the
sys
package, you can find a lot of useful information about your installation:import sys print(sys.executable) print(sys.exec_prefix)
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.