{"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":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/python.rs","lineNumber":1556,"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":1538,"sourceCodeEnd":1574,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/core/python.rs#L1538-L1574","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install python via a vfox plugin: `mise use vfox:python@<version>` (add the vfox registry/plugin if needed)","Choose a python version that has a precompiled standalone Windows build so no compile step is needed","Perform source compilation inside WSL instead of native Windows"],"exampleFix":"// before\nmise settings set python.compile 1\nmise install python@3.12.0  // fails on windows\n\n// after\nmise use vfox-python  # configure plugin\nmise use vfox:version-fox/python@3.12.0","handlingStrategy":"validation","validationCode":"case \"$(uname -s)\" in\n  MINGW*|CYGWIN*|Windows_NT) [[ \"$(mise settings get python.compile)\" == \"true\" ]] && echo \"unset python.compile on windows or use vfox:python\" ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["On Windows never enable python.compile for core:python","Configure the vfox python plugin for source builds on Windows","Use WSL for compile-from-source python workflows"],"tags":["python","windows","compile","unsupported-platform"],"backgroundTag":"unsupported-platform","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}