Skip to content

setup.sh fails on Windows 10: python3 resolves to Microsoft Store alias, not real Python #292

@Input-X

Description

@Input-X

Platform

Windows 10 (native, not WSL2)

Problem

setup.sh fails immediately with:

=== AIPass Setup ===
Repo root: /c/repo/AIPass

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.
Exit code 49

On Windows 10, the python3 command is mapped to a Microsoft Store App Execution Alias by default. command -v python3 finds it (so the existence check passes), but actually invoking python3 returns the Store redirect message instead of running Python — causing the script to exit early via set -euo pipefail.

The real Python 3.13.5 install is available as python (no 3 suffix) or via full path (e.g. C:\Users\...\Python313\python.exe).

Reproduction

  1. Windows 10 with Python 3.13 installed from python.org
  2. Microsoft Store App Execution Alias for python3 enabled (default)
  3. bash setup.sh (via Git Bash)

Expected behavior

Setup detects real Python or falls back to python on Windows.

Suggested fix

In setup.sh, after the Windows detection block, fall back to python if python3 fails:

if ! command -v python3 &>/dev/null || ! python3 -c "import sys" &>/dev/null; then
    if command -v python &>/dev/null && python -c "import sys" &>/dev/null; then
        alias python3=python  # or use a variable: PYTHON=python
    else
        echo "FAIL: python3 not found. Install Python 3.10+ and try again."
        exit 1
    fi
fi

Or instruct Windows users to disable the App Execution Alias in Settings > Apps > Advanced app settings > App execution aliases.

Context

Discovered during Windows 10 fresh-clone test (issue #291 series).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions