Let me set the scene,
You’re standing in Terminal 5, suncream packed and ready to soak up the Spanish sun, when suddenly, panic hits. Where’s the snake? Somehow, you’ve lost track of your pet python, and the trip is in jeopardy.
Now, swap the snake for Python—the programming kind—and you’ve got a similar feeling of dread when your terminal can’t find where Python is installed. It’s frustrating, but thankfully, it's an easy fix.
When you install Python, you're asked to choose a file path. If, like me, you breezed past that step thinking it wasn’t important, you might now be staring at a terminal error, wondering what went wrong.
This issue occurs because your terminal simply doesn’t know where to look. So, how do we sort it out?
- Locate Python Installation:
Open File Explorer and find where Python was installed on your machine. This is where mine was saved:

- Change App Execution Aliases (Optional but Helpful):
Go to Settings > Apps > Advanced App Settings > App Execution Aliases and turn off the toggles for Python. This ensures Windows uses the version you installed, not the placeholder from the Microsoft Store.
- Edit Environment Variables:
- Search for “Edit the system environment variables” in the Windows Start menu.
- Click on the Environment Variables button.
- Under “System Variables”, find the variable called
Path
, select it, and click Edit.

- Add Python Paths:
- Click New or Edit and paste the file path you found in Step 1.

- Then, add the path to the
Scripts
folder inside your Python directory. For example:

- Verify the Fix:
- Open VS Code or any terminal.
- Type:bashCopyEditpython --version
If it returns the version number without error, congrats—you’ve successfully located the snake. Crisis averted.