Skip to content

Commit

Permalink
Fix Conda Python detection on Windows (#2279)
Browse files Browse the repository at this point in the history
## 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 #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.
  • Loading branch information
charliermarsh authored Mar 7, 2024
1 parent 4796927 commit c3cd550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/uv-interpreter/src/python_environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub(crate) fn detect_python_executable(venv: impl AsRef<Path>) -> 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")
Expand Down

0 comments on commit c3cd550

Please sign in to comment.