jdx/mise · error
invalid python.precompiled_arch=
Error message
invalid python.precompiled_arch={arch:?}: this looks like a target triple. Set python.precompiled_arch={precompiled_arch:?} and python.precompiled_os={precompiled_os:?} instead. What it means
mise accepts the settings python.precompiled_arch and python.precompiled_os to override which precompiled python distribution is selected. When python.precompiled_arch is set to an entire target triple like "x86_64-unknown-linux-gnu", split_python_precompiled_triple detects it and mise fails fast with a corrective message instead of silently failing to match a distribution.
Solutions
- Split the triple across the two settings: set python.precompiled_arch to the arch (e.g. "x86_64") and python.precompiled_os to the os (e.g. "linux" or "unknown-linux-gnu") exactly as the error suggests
- Remove python.precompiled_arch entirely if you did not intend a cross/precompiled override
Example fix
// before [python] precompiled_arch = "x86_64-unknown-linux-gnu" // after [python] precompiled_arch = "x86_64" precompiled_os = "unknown-linux-gnu"
Defensive patterns
Strategy: validation
Validate before calling
const arch = settings.python?.precompiled_arch;
if (arch && arch.includes("-")) {
throw new Error(`python.precompiled_arch must be a bare arch, got triple '${arch}'; split into precompiled_arch + precompiled_os`);
} Type guard
const isBareArch = (v) => typeof v === "string" && /^[a-z0-9_]+$/.test(v) && !v.includes("-");
// usage: if (!isBareArch(arch)) reject(...); Prevention
- Always set python.precompiled_arch to a bare arch token (x86_64, aarch64) — never a target triple
- Put OS components in python.precompiled_os, not in the arch key
- Lint mise.toml/settings for hyphenated values in precompiled_arch in CI
When it happens
Trigger: Setting `python.precompiled_arch = "x86_64-unknown-linux-gnu"` (or any value that splits into arch+os as a triple) in settings, then running `mise install python@...`. Also exercised directly by validate_python_precompiled_settings during install and by unit tests.
Common situations: Copying a rust-style target triple from CI docs into the arch setting; misunderstanding the setting as a platform string rather than a bare arch.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- invalid python.precompiled_arch=
- absent bootstrap group
- absent bootstrap user
- backend is disabled by disable_backends
- [bootstrap.directories].
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/f9dc5d03f5731bb0.
Report an issue: GitHub.
Appendix: source
Thrown at src/plugins/core/python.rs:1369
}
fn python_precompiled_url_path(settings: &Settings) -> String {
if cfg!(windows) || cfg!(linux) || cfg!(macos) {
format!(
"python-precompiled-{}-{}.gz",
python_arch(settings),
python_os(settings)
)
} else {
"python-precompiled.gz".into()
}
}
fn validate_python_precompiled_settings(settings: &Settings) -> Result<()> {
if let Some(arch) = &settings.python.precompiled_arch
&& let Some((precompiled_arch, precompiled_os)) = split_python_precompiled_triple(arch)
{
bail!(
"invalid python.precompiled_arch={arch:?}: this looks like a target triple. \
Set python.precompiled_arch={precompiled_arch:?} and \
python.precompiled_os={precompiled_os:?} instead."
);
}
if let Some(arch) = &settings.python.precompiled_arch
&& looks_like_python_precompiled_os_value(arch)
{
bail!(
"invalid python.precompiled_arch={arch:?}: this looks like an OS value. \
Use python.precompiled_os={arch:?} instead, and set python.precompiled_arch \
to an architecture such as \"x86_64\" or \"aarch64\"."
);
}
Ok(())
}
fn split_python_precompiled_triple(value: &str) -> Option<(&str, &str)> {View on GitHub (pinned to 533346cc37)