Skip to content

Commit

Permalink
Don't resolve system python for system python3
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed May 28, 2024
1 parent ddf576b commit 6b796b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/python-tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ python_info <- function(path) {
# Some installations might not place Python within a 'Scripts' or 'bin'
# sub-directory, so look in the root directory too.
prefixes <- list(NULL, if (is_windows()) "Scripts" else "bin")
suffixes <- if (is_windows()) "python.exe" else c("python", "python3")
suffixes <- if (is_windows())
"python.exe"
else if (startsWith(basename(path), "python3"))
"python3" # don't resolve 'python' for 'python3' first.
else
c("python", "python3")

# placeholder for a discovered system python
systemPython <- NULL
Expand Down

0 comments on commit 6b796b9

Please sign in to comment.