How to locate Python Installation on Windows (10/11)

If you are unable to find Python being installed on your Windows (10/11) operating system and wondering how to locate the folder, well there are a few things that you can try.

Option 1: Make use of the where command

If you make use of the Command Prompt or PowerShell you can try to make use of the where command.

The where command can be used to display the location of files that match the given search pattern.

C:/> where python

C:/> C:\Users\Code2care\AppData\Local\Programs\Python\Python39-32\python-exe

Option 2: Using the which command

If you make use of bash or git bash on Windows, you can try the which command.

# man witch 

which – locate a program file in the user's path
which python

Oprion 3: Using Python code

This may sound funny, but you can write your own Python script or execute code snippets to find out the location of your Python installation on your Windows device using the os module.

>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)

Option 4: Check the Environment Variables

Python is often added to the system's PATH environment variable during installation. You can check if the Python installation directory is listed in the PATH variable by following these steps,

  1. Go to Start menu and search for "Environment Variables"
  2. Click on "Edit the system environment variables" option.
  3. In System Properties -> "Environment Variables" button.
  4. Look for Path under "System variables"
  5. Click edit and check if the Python installation directory is included.

Option 6: Search Manually

Most commonly Python setup is installed under C: drive "Program Files" or "Program Files (x86)" based on 32/64 bit versions. You can try to go to this location and try to find out.

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap