01Article

Remote Coders · Knowledge Base

RC RemoteCoders

PYTHON WAS NOT FOUND — FIX

This Windows error appears when Python isn’t on your PATH or a system alias hijacks the command. Here’s how to install correctly, fix PATH, and verify.

Quick fix: Reinstall from python.org and check “Add python.exe to PATH” during setup. Then open a new terminal and run python --version.

  1. 1

    Locate your Python install

    Common paths after a user install:

    %AppData%\Programs\Python\Python311
    %AppData%\Programs\Python\Python311\Scripts

    If you can’t find Python, see this quick guide.

    Finding Python installation folders
  2. 2

    Open Environment Variables

    Search “Environment Variables” in Windows Search and open System Properties.

    Search Environment Variables in Windows
    System Properties dialog
  3. 3

    Edit the Path variable

    System Properties → Environment Variables → under your account, select “Path” → Edit.

    Environment Variables window
    Edit Path entries
  4. 4

    Add Python and Scripts paths

    Click “New” and add both folders you noted in Step 1. Example:

    %AppData%\Programs\Python\Python311
    %AppData%\Programs\Python\Python311\Scripts

    Add new Path entries
    Environment variable entries for Python
  5. 5

    Verify in a new terminal

    Open a new terminal or PowerShell and run:

    python --version
    pip --version
    py -V

    If the first two still fail but py -V works, try py -m pip install <pkg>.

  6. 6

    Optional: disable Windows “App execution alias”

    Windows 10/11 can hijack python via an alias:

    • Settings → Apps → Advanced app settings → App execution aliases
    • Turn off the aliases for Python (App Installer)

Tip: If you installed for “All Users,” paths are usually under C:\Program Files\Python311\. Add both Python311 and Python311\Scripts.