Skip to content

Commit

Permalink
Fix Win32 Conda Python Interpreters (#644)
Browse files Browse the repository at this point in the history
* Update python_interpreter.rs

* Update python_interpreter.rs

* Update python_interpreter.rs

* lint

* typo

* Update src/python_interpreter.rs

Co-authored-by: messense <messense@icloud.com>
  • Loading branch information
formlogic-robert and messense authored Oct 9, 2021
1 parent 95db5b7 commit 3e0a44e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/python_interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ fn find_all_windows(target: &Target, min_python_minor: usize) -> Result<Vec<Stri
}

for path in paths {
let executable = Path::new(&path).join("python");
let executable_win = Path::new(&path).join("python.exe");
let executable = if executable_win.exists() {
executable_win
} else {
Path::new(&path).join("python")
};
let python_info = Command::new(&executable)
.arg("-c")
.arg("import sys; print(sys.version)")
Expand Down

0 comments on commit 3e0a44e

Please sign in to comment.