From c3cd550a7a7c41b2c286ca52fbb6dec5fea195ef Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 7 Mar 2024 06:45:09 -0800 Subject: [PATCH] Fix Conda Python detection on Windows (#2279) ## Summary In #2102, I did some refactor, and changed a method to return the Python executable path rather than the parent directory path. But I missed this one codepath for Conda on Windows. Closes https://github.com/astral-sh/uv/issues/2269. ## Test Plan - Installed micromamba on my Windows machine. - Reproduced the failure in the linked issue. - Verified that `python.exe` exists at `${CONDA_PREFIX}\python.exe`. - Ran with this change; installed successfully. --- crates/uv-interpreter/src/python_environment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 44335a3ba..4d19bc38c 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -181,7 +181,7 @@ pub(crate) fn detect_python_executable(venv: impl AsRef) -> PathBuf { } // Fallback for Conda environments. - venv.to_path_buf() + venv.join("python.exe") } else { // Search for `python` in the `bin` directory. venv.join("bin").join("python")