{"record":{"id":"b890108e0c0fe7f7","repo":"LykosAI/StabilityMatrix","slug":"this-method-of-installing-triton-and-sageattention-is-only","errorCode":null,"errorMessage":"This method of installing Triton and SageAttention is only supported on Windows","messagePattern":"This method of installing Triton and SageAttention is only supported on Windows","errorType":"exception","errorClass":"PlatformNotSupportedException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Core/Models/PackageModification/InstallSageAttentionStep.cs","lineNumber":30,"sourceCode":"\npublic class InstallSageAttentionStep(\n    IDownloadService downloadService,\n    IPrerequisiteHelper prerequisiteHelper,\n    IPyInstallationManager pyInstallationManager\n) : IPackageStep\n{\n    private const string PythonLibsDownloadUrl = \"https://cdn.lykos.ai/python_libs_for_sage.zip\";\n\n    public required InstalledPackage InstalledPackage { get; init; }\n    public required DirectoryPath WorkingDirectory { get; init; }\n    public required bool IsBlackwellGpu { get; init; }\n    public IReadOnlyDictionary<string, string>? EnvironmentVariables { get; init; }\n\n    public async Task ExecuteAsync(IProgress<ProgressReport>? progress = null)\n    {\n        if (!Compat.IsWindows)\n        {\n            throw new PlatformNotSupportedException(\n                \"This method of installing Triton and SageAttention is only supported on Windows\"\n            );\n        }\n\n        var venvDir = WorkingDirectory.JoinDir(\"venv\");\n        var pyVersion = PyVersion.Parse(InstalledPackage.PythonVersion);\n        if (pyVersion.StringValue == \"0.0.0\")\n        {\n            pyVersion = PyInstallationManager.Python_3_10_11;\n        }\n\n        var baseInstall = !string.IsNullOrWhiteSpace(InstalledPackage.PythonVersion)\n            ? new PyBaseInstall(\n                await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false)\n            )\n            : PyBaseInstall.Default;\n\n        await using var venvRunner = baseInstall.CreateVenvRunner(","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Core/Models/PackageModification/InstallSageAttentionStep.cs#L12-L48","documentation":"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.","triggerScenarios":"Running the Triton+SageAttention install step on Linux or macOS via InstallPackage.","commonSituations":"Users on Linux wanting SageAttention — the step simply doesn't support the non-Wheel flow; portable builds run on non-Windows hosts.","solutions":["Run this install step only on Windows","On Linux, install triton and sageattention via pip inside the venv manually","Skip the step on non-Windows platforms"],"exampleFix":"// before\nawait sageStep.ExecuteAsync();\n// after\nif (Compat.IsWindows) await sageStep.ExecuteAsync(); else /* manual pip path */","handlingStrategy":"type-guard","validationCode":"if (!Compat.IsWindows) skipSageAttentionStep();","typeGuard":"bool CanInstallSageAttention() => Compat.IsWindows;","tryCatchPattern":"try { await step.ExecuteAsync(progress); } catch (PlatformNotSupportedException) { /* fall back to pip install or skip */ }","preventionTips":["Gate Windows-only steps behind OS checks","Provide Linux pip fallback for triton/sageattention","Document platform limits in package definitions"],"tags":["csharp","windows","sageattention","triton"],"backgroundTag":"unsupported-platform","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}