Devolutions/UniGetUI · error · InvalidOperationException
Microsoft Store python alias is not a valid python install
Error message
Microsoft Store python alias is not a valid python install
What it means
Pip._loadManagerVersion runs 'python --version' (or the resolved executable) and, when the exit code is 9009, throws InvalidOperationException. Exit 9009 is the Windows shell indicator that the command resolved to the Microsoft Store 'python' app stub, which is not a real Python install.
Source
Thrown at src/UniGetUI.PackageEngine.Managers.Pip/Pip.cs:518
{
StartInfo = new ProcessStartInfo
{
FileName = Status.ExecutablePath,
Arguments = Status.ExecutableCallArgs + "--version " + GetProxyArgument(),
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
StandardOutputEncoding = System.Text.Encoding.UTF8,
},
};
process.Start();
version = process.StandardOutput.ReadToEnd().Trim();
process.WaitForExit();
if (process.ExitCode is 9009)
{
throw new InvalidOperationException(
"Microsoft Store python alias is not a valid python install"
);
}
}
protected override void _performExtraLoadingSteps()
{
Environment.SetEnvironmentVariable(
"PIP_REQUIRE_VIRTUALENV",
"false",
EnvironmentVariableTarget.Process
);
// Pre-warm the package name index in the background so the first search doesn't
// need to wait for the ~38 MB download inside the search timeout window.
Task.Run(() =>
{
var logger = TaskLogger.CreateNew(LoggableTaskType.FindPackages);View on GitHub (pinned to 9b1d7d0eab)
Solutions
- Install real Python from python.org (or via winget: Python.Python.3.12) and ensure it precedes the Store alias on PATH.
- Disable the Microsoft Store 'App execution aliases' for python.exe/python3.exe in Windows Settings.
- Point UniGetUI's pip executable setting at the real python.exe path.
Example fix
# before: only the Store alias is on PATH -> exit 9009 -> InvalidOperationException # after: install real python and disable the alias winget install Python.Python.3.12 # Windows Settings > Apps > Advanced app settings > App execution aliases -> python off
Defensive patterns
Strategy: validation
Validate before calling
// Detect the Store alias path before trusting the executable.
if (Status.ExecutablePath.Contains("WindowsApps", StringComparison.OrdinalIgnoreCase))
throw new InvalidOperationException("Resolved python is the Store alias; install real Python."); Type guard
static bool IsStoreAlias(string path) =>
path.Contains("WindowsApps", StringComparison.OrdinalIgnoreCase); Prevention
- Install Python from python.org (or winget Python.Python.3.x).
- Disable Windows Store 'App execution aliases' for python.exe/python3.exe.
- Set UniGetUI's pip executable to the real python.exe path.
When it happens
Trigger: The discovered python executable is the Windows Store alias (%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe) which prints nothing and exits 9009 instead of a version.
Common situations: Fresh Windows install where only the Store alias exists; user disabled the Store alias but PATH still points at WindowsApps; python.org Python not installed.
Related errors
- Scoop is not ready.
- The maintenance command exited with code {process.ExitCode}.
- The manager action "{action}" is only supported on Windows.
- PyPI simple index returned {(int)response.StatusCode} {respo
- PyPI simple index returned 0 packages — response may be malf
AI-assisted analysis of Devolutions/UniGetUI@9b1d7d0eab (2026-08-13).
Data as JSON: /api/errors/296eac0c6aec3dbb.
Report an issue: GitHub.