From 5809ac6733b6d4784fb9a83dea4d483707cdfb55 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Fri, 20 Dec 2024 11:52:14 -0500 Subject: [PATCH] Remove `+` suffix from Python version in `virtualenv_starter()` closes #1704 --- NEWS.md | 3 +++ R/virtualenv.R | 1 + 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 7c881d834..40c85b30e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # reticulate (development version) +- Fixed an issue where `virtualenv_starter()` would not discover a + custom built Python (#1704). + # reticulate 1.40.0 - The S3 classes for some (rarely encountered) Python objects have changed. diff --git a/R/virtualenv.R b/R/virtualenv.R index 2a97a3117..53198eb57 100644 --- a/R/virtualenv.R +++ b/R/virtualenv.R @@ -551,6 +551,7 @@ virtualenv_starter <- function(version = NULL, all = FALSE) { length(v) != 1L || !startsWith(v, "Python ")) return(NA_character_) + v <- sub("\\+.*$", "", v) substr(v, 8L, 999L) }, error = function(e) NA_character_), ""), strict = FALSE) df <- data.frame(version = v, path = p,