jdx/mise · error

python cannot currently be compiled on windows with core:pyt

Error message

python cannot currently be compiled on windows with core:python, use vfox:python instead

What it means

core:python's source-build path (python-build based) cannot run on Windows; before attempting to install/compile a Python build from source, ensure_not_windows aborts with a pointer to vfox:python. This guards an unsupported operation for the core plugin.

Source

Thrown at src/plugins/core/python.rs:1556

/// `versions.json` dates are plain `YYYY-MM-DD`; `created_at` wants a timestamp.
fn pypy_created_at(date: Option<&str>) -> Option<String> {
    let date = date?;
    if date.len() != 10 {
        return None;
    }
    Some(format!("{date}T00:00:00Z"))
}

fn pypy_file_for<'a>(release: &'a PypyRelease, platform: &str, arch: &str) -> Option<&'a PypyFile> {
    release
        .files
        .iter()
        .find(|f| f.platform == platform && f.arch == arch)
}

fn ensure_not_windows() -> eyre::Result<()> {
    if cfg!(windows) {
        bail!(
            "python cannot currently be compiled on windows with core:python, use vfox:python instead"
        );
    }
    Ok(())
}

fn filter_freethreaded(v: &str, flavor: &Option<String>) -> bool {
    flavor.as_ref().is_some_and(|f| f.contains("freethreaded")) || !v.contains("freethreaded")
}

#[cfg(test)]
mod tests {
    use super::*;

    fn opts_with(key: &str, value: &str) -> ToolVersionOptions {
        opts_with_value(key, toml::Value::String(value.to_string()))
    }

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Install python via a vfox plugin: `mise use vfox:python@<version>` (add the vfox registry/plugin if needed)
  2. Choose a python version that has a precompiled standalone Windows build so no compile step is needed
  3. Perform source compilation inside WSL instead of native Windows

Example fix

// before
mise settings set python.compile 1
mise install python@3.12.0  // fails on windows

// after
mise use vfox-python  # configure plugin
mise use vfox:version-fox/python@3.12.0
Defensive patterns

Strategy: validation

Validate before calling

case "$(uname -s)" in
  MINGW*|CYGWIN*|Windows_NT) [[ "$(mise settings get python.compile)" == "true" ]] && echo "unset python.compile on windows or use vfox:python" ;;
esac

Prevention

When it happens

Trigger: Installing python via core:python with python.compile enabled (or no precompiled match forcing source build) on a Windows host; install_or_update_python_build calls ensure_not_windows first.

Common situations: Windows user setting python.compile=1 following Linux docs; precompiled standalone builds unavailable for the requested version on Windows so mise falls through to compile.

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 jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/978b672f5b31ee95. Report an issue: GitHub.