LykosAI/StabilityMatrix · error · MissingPrerequisiteException
Python was not found and/or failed to install. Please check…
Error message
Python {pyVersion} was not found and/or failed to install. Please check the logs for more details. What it means
InstallPackageRequirements calls EnsurePythonVersion(pyVersion) to download/install the required Python build; when that returns false (download, hash, or extraction failed) it raises MissingPrerequisiteException for the 'Python' prerequisite, telling the user to check logs. It aggregates any underlying install failure into a single user-facing prerequisite error.
Solutions
- Check Stability Matrix logs (Help > Open Logs) for the underlying download/hash/extract failure and retry after fixing connectivity.
- Verify network access to the Python download URL (VPN/proxy/firewall) and retry the package install.
- If the requested version isn't supported, change the package venv to Python 3.10.11.
- Clear the partially downloaded python tar.gz under the Assets dir and reinstall.
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check network access to the Python asset host before install
using var ping = new HttpClient();
var resp = await ping.GetAsync(assetUrl, HttpCompletionOption.ResponseHeadersRead);
if (!resp.IsSuccessStatusCode || resp.Content.Headers.ContentLength is null or 0)
throw new Exception("Python asset unreachable; fix network before install"); Try / catch
try { await helper.InstallPackageRequirements(package, pyVersion, ct); }
catch (MissingPrerequisiteException ex)
{ logger.Error(ex, "Python prerequisite missing; see inner logs"); NotifyUserToCheckLogs(); } Prevention
- Ensure stable internet and no interfering proxy before installing packages.
- Read app logs for the underlying download/hash/extract failure.
- Clean up partial downloads in the assets directory after failed installs.
- Only request Python versions the app bundles for your platform.
When it happens
Trigger: Installing a package on Unix whose required Python version fails to download, fails SHA-256 verification, fails to extract, or has no bundled asset — EnsurePythonVersion returns false and this exception is thrown.
Common situations: Network failures or proxies blocking the Python tar.gz download; CDN/host serving an HTML error page (hash mismatch); missing asset for non-3.10.11 versions; corrupted archive from a partial download.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Unsupported Python version
- Python download did not contain expected inner 'python'…
- Python download hash mismatch: expected , actual
- Git installation canceled
- Torch is not installed in the virtual environment.
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/2be55680b39d217d.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/Helpers/UnixPrerequisiteHelper.cs:146
List<PackagePrerequisite> prerequisites,
PyVersion? pyVersion = null,
IProgress<ProgressReport>? progress = null
)
{
await UnpackResourcesIfNecessary(progress);
await InstallUvIfNecessary(progress);
if (prerequisites.Contains(PackagePrerequisite.Python310))
{
await InstallPythonIfNecessary(PyInstallationManager.Python_3_10_11, progress);
await InstallVirtualenvIfNecessary(PyInstallationManager.Python_3_10_11, progress);
}
if (pyVersion is not null)
{
if (!await EnsurePythonVersion(pyVersion.Value))
{
throw new MissingPrerequisiteException(
@"Python",
@$"Python {pyVersion} was not found and/or failed to install. Please check the logs for more details."
);
}
}
if (prerequisites.Contains(PackagePrerequisite.Git))
{
await InstallGitIfNecessary(progress);
}
if (prerequisites.Contains(PackagePrerequisite.Node))
{
await InstallNodeIfNecessary(progress);
}
if (prerequisites.Contains(PackagePrerequisite.Dotnet))
{View on GitHub (pinned to af93d6ef57)