. Advertisement .
. Advertisement .
Of course, once you’ve done with your installation, the Python installer has asked which location you want your brand new application to be. But now that memory unfortunately faded out of mind with not even a speck left over?
Luckily for you, we’ve got the absolute remedy for such fuzzy trouble! Let’s learn more in our article “Where is Python installed”!
Where Python Is Normally?
The Python installer, like any other program, will first inquire whether a special installation directory is in your demand or not. If that’s the case, the user may then indicate the directory where exactly they want the installation to occur.
Otherwise, the following default addresses will be the destination for your newly established program. The list includes:
- C:\Program Files\
As such, when you go with the AppData directory, installing the app will not require any administrator privilege but you also have to accept that only the person who installed it can gain access to the program.
The C:\Program Files directory, on the other hand, would be a flawless option for coders who work as a team to share the project. In the meantime, restricted permissions in the Program Files subdirectory might prevent some programs from being installed or accessed.
What about the Python XY directory? As the same as the mentioned path, it enables all users, not just the one who installed Python, to make use of the installed program.
However, the issue of security is one of the key disadvantages of putting Python in the root directory. The root directory is less secure since anyone with access to the user may discover it and access it with ease.
Where Is Python Installed? Figure Out Your Python On Windows
There are 2 ways in which you can track down your Python. The first to come is to employ the sys library.
Method #1: Utilize The sys Library
As such, this following code will help you to locate the program’s headquarters.
Running the code:
locate_python = sys.exec_prefix
Take note that such a path structure is only an example of what you may retrieve by using the above code.
Method #2: Hand Operating
In case the sys library sounds kind of problematic (but it’s not once you get more familiar, actually), you can also progress the finding yourself manually as an alternative option.
Belows are some fundamental steps that help you implement the process more painstakingly:
- Step 1: Go to the Windows Search Bar and find Python.
- Step 2: Click your mouse right on the Python symbol.
- Step 3: Select “Open file location.”
- Step 4: Click your mouse right on the Python shortcut.
- Step 5: Choose “Open File Location”
The path or location of your Python installation on Windows will now be displayed to you as follow:
For your information, this path identified using this approach corresponds to the path discovered using the first method to much extent.
Above is our sharing regarding the prevalent “Where is Python installed”. Hopefully, this article can be of great help to you. See then!