LykosAI/StabilityMatrix · error · PlatformNotSupportedException

This method of installing Triton and SageAttention is only…

Error message

This method of installing Triton and SageAttention is only supported on Windows

What it means

InstallSageAttentionStep.ExecuteAsync installs prebuilt Triton/SageAttention wheels only on Windows; on any other OS it throws PlatformNotSupportedException because the wheel-based flow is Windows-specific.

Solutions

  1. Run this install step only on Windows
  2. On Linux, install triton and sageattention via pip inside the venv manually
  3. Skip the step on non-Windows platforms

Example fix

// before
await sageStep.ExecuteAsync();
// after
if (Compat.IsWindows) await sageStep.ExecuteAsync(); else /* manual pip path */
Defensive patterns

Strategy: type-guard

Validate before calling

if (!Compat.IsWindows) skipSageAttentionStep();

Type guard

bool CanInstallSageAttention() => Compat.IsWindows;

Try / catch

try { await step.ExecuteAsync(progress); } catch (PlatformNotSupportedException) { /* fall back to pip install or skip */ }

Prevention

When it happens

Trigger: Running the Triton+SageAttention install step on Linux or macOS via InstallPackage.

Common situations: Users on Linux wanting SageAttention — the step simply doesn't support the non-Wheel flow; portable builds run on non-Windows hosts.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12). Data as JSON: /api/errors/b890108e0c0fe7f7. Report an issue: GitHub.

Appendix: source

Thrown at StabilityMatrix.Core/Models/PackageModification/InstallSageAttentionStep.cs:30

public class InstallSageAttentionStep(
    IDownloadService downloadService,
    IPrerequisiteHelper prerequisiteHelper,
    IPyInstallationManager pyInstallationManager
) : IPackageStep
{
    private const string PythonLibsDownloadUrl = "https://cdn.lykos.ai/python_libs_for_sage.zip";

    public required InstalledPackage InstalledPackage { get; init; }
    public required DirectoryPath WorkingDirectory { get; init; }
    public required bool IsBlackwellGpu { get; init; }
    public IReadOnlyDictionary<string, string>? EnvironmentVariables { get; init; }

    public async Task ExecuteAsync(IProgress<ProgressReport>? progress = null)
    {
        if (!Compat.IsWindows)
        {
            throw new PlatformNotSupportedException(
                "This method of installing Triton and SageAttention is only supported on Windows"
            );
        }

        var venvDir = WorkingDirectory.JoinDir("venv");
        var pyVersion = PyVersion.Parse(InstalledPackage.PythonVersion);
        if (pyVersion.StringValue == "0.0.0")
        {
            pyVersion = PyInstallationManager.Python_3_10_11;
        }

        var baseInstall = !string.IsNullOrWhiteSpace(InstalledPackage.PythonVersion)
            ? new PyBaseInstall(
                await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false)
            )
            : PyBaseInstall.Default;

        await using var venvRunner = baseInstall.CreateVenvRunner(

View on GitHub (pinned to af93d6ef57)