#1059·OpenJarvis

Windows installer aborts on machines that have Python: `python3` resolves to the Microsoft Store alias stub

Author: srcreativepro-artCreated Sep 28, 2026Updated Sep 28, 2026

Component: deploy/windows/install.ps1 (served as https://open-jarvis.github.io/OpenJarvis/install.ps1) Severity: blocks installation entirely

Environment

OS Windows 11 Home Single Language, build 26200
PowerShell 5.1.26100.9444 (Windows PowerShell, not pwsh)
Python 3.12.10, python.org per-user install at %LOCALAPPDATA%\Programs\Python\Python312
Commit 8acafed2

What happens

irm https://open-jarvis.github.io/OpenJarvis/install.ps1 | iex
[info]  Checking Python (3.10 - 3.13)...
python3.exe : 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.
At line:179 char:11

The installer aborts at the version check even though a supported Python 3.12.10 is installed and on PATH.

Root cause

Get-PythonCommand (install.ps1:150) probes python3 before python:

powershell
foreach ($name in @('python3', 'python')) {
    $cmd = Get-Command $name -ErrorAction SilentlyContinue
    if ($cmd) { return $cmd.Source }
}

On Windows, %LOCALAPPDATA%\Microsoft\WindowsApps ships 0-byte App Execution Alias stubs for both python.exe and python3.exe, and that directory is on the default user PATH. Meanwhile a python.org per-user install only ever creates python.exe — never python3.exe.

So on a machine with a perfectly good Python:

  • Get-Command python3 succeeds — it finds the 0-byte stub
  • the function returns that path and never tries python
  • the stub is not an interpreter; running it prints the "Python was not found" message to stderr and exits non-zero
  • & $pythonExe --version at install.ps1:179 therefore fails, and the regex parse aborts the installer

The check is doing exactly the wrong thing: it treats the presence of a name on PATH as proof of an interpreter, when on Windows that specific name is near-guaranteed to be a stub.

This also makes the failure very hard to self-diagnose — the message tells the user to install Python, which they already did.

Suggested fix

Probe python first, and reject 0-byte alias stubs explicitly so the ordering isn't the only line of defence:

powershell
function Get-PythonCommand {
    foreach ($name in @('python', 'python3')) {
        $cmd = Get-Command $name -ErrorAction SilentlyContinue
        if (-not $cmd) { continue }
        # A 0-byte reparse point is the Store alias, not an interpreter.
        $item = Get-Item -LiteralPath $cmd.Source -ErrorAction SilentlyContinue
        if ($item -and $item.Length -eq 0) {
            Write-Warn2 "  Ignoring Microsoft Store alias stub at $($cmd.Source)"
            continue
        }
        return $cmd.Source
    }
    return $null
}

The size check is what actually makes this robust: it also covers the case where a user has an alias stub for python but a real python3 elsewhere.

Workaround for anyone hitting this now

Either disable the aliases under Settings → Apps → Advanced app settings → App execution aliases, or create a python3.exe next to your real interpreter:

powershell
Copy-Item "$env:LOCALAPPDATA\Programs\Python\Python312\python.exe" `
          "$env:LOCALAPPDATA\Programs\Python\Python312\python3.exe"

This works because that directory precedes WindowsApps on the user PATH.

A fix is proposed in #1056.