{"record":{"id":"978b672f5b31ee95","repo":"jdx/mise","slug":"python-cannot-currently-be-compiled-on-windows-wit","errorCode":null,"errorMessage":"python cannot currently be compiled on windows with core:python, use vfox:python instead","messagePattern":"python cannot currently be compiled on windows with core:python, use vfox:python instead","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/python.rs","lineNumber":1568,"sourceCode":"/// `versions.json` dates are plain `YYYY-MM-DD`; `created_at` wants a timestamp.\nfn pypy_created_at(date: Option<&str>) -> Option<String> {\n    let date = date?;\n    if date.len() != 10 {\n        return None;\n    }\n    Some(format!(\"{date}T00:00:00Z\"))\n}\n\nfn pypy_file_for<'a>(release: &'a PypyRelease, platform: &str, arch: &str) -> Option<&'a PypyFile> {\n    release\n        .files\n        .iter()\n        .find(|f| f.platform == platform && f.arch == arch)\n}\n\nfn ensure_not_windows() -> eyre::Result<()> {\n    if cfg!(windows) {\n        bail!(\n            \"python cannot currently be compiled on windows with core:python, use vfox:python instead\"\n        );\n    }\n    Ok(())\n}\n\nfn filter_freethreaded(v: &str, flavor: &Option<String>) -> bool {\n    flavor.as_ref().is_some_and(|f| f.contains(\"freethreaded\")) || !v.contains(\"freethreaded\")\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    fn opts_with(key: &str, value: &str) -> ToolVersionOptions {\n        opts_with_value(key, toml::Value::String(value.to_string()))\n    }\n","sourceCodeStart":1550,"sourceCodeEnd":1586,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/python.rs#L1550-L1586","documentation":"The core python plugin's source-build path (python-build / install_or_update_python_build) cannot run on Windows; ensure_not_windows() bails before attempting compilation and points users at the vfox-based python plugin instead. mise throws this because the build toolchain the core plugin drives is unix-only.","triggerScenarios":"On a Windows host, installing python with compilation required (e.g. python.compile=true, or a version with no precompiled build) reaching ensure_not_windows via install_or_update_python_build.","commonSituations":"Forcing python.compile=true on Windows to get an EOL python version; a version absent from python-build-standalone causing a fallthrough to the compile path on Windows.","solutions":["Use the vfox python plugin: `mise use vfox:version-fox/vfox-python@<version>` or `mise settings set python.compile false` and pick a precompiled version","Install a python version available precompiled so the compile path is never reached","Run the build inside WSL where the unix compile path works"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// pre-install guard for CI on windows runners\nif (process.platform === \"win32\" && settings.python?.compile) {\n  throw new Error(\"core python cannot compile on windows; use vfox:version-fox/vfox-python or a precompiled version\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await $`mise install python@${ver}`;\n} catch (e) {\n  if (String(e).includes(\"cannot currently be compiled on windows\")) {\n    await $`mise use vfox:version-fox/vfox-python@${ver}`;\n  } else throw e;\n}","preventionTips":["On Windows rely on precompiled python builds; never set python.compile=true there","Use vfox-python for windows builds needing compilation","Run heavy python source builds inside WSL instead"],"tags":["python","windows","compile","unsupported-platform"],"backgroundTag":"unsupported-platform","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}