From c0b79a3f032030277ce4fc2f7100dfe3a3377a72 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 23 Apr 2024 07:58:01 -0400 Subject: [PATCH 1/2] ignore broken links encountered by `virtualenv_starter()` Reported in https://github.com/rstudio/tensorflow/issues/597 --- R/virtualenv.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/virtualenv.R b/R/virtualenv.R index dbf66c842..f50065f2a 100644 --- a/R/virtualenv.R +++ b/R/virtualenv.R @@ -533,8 +533,10 @@ virtualenv_starter <- function(version = NULL, all = FALSE) { suffix) } - p <- unique(normalizePath(Sys.glob(glob), winslash = "/")) + p <- unique(normalizePath(Sys.glob(glob), winslash = "/", mustWork = FALSE)) p <- p[grep("^python[0-9.]*(\\.exe)?$", basename(p))] + p <- p[utils::file_test("-x", p)] + p <- p[utils::file_test("-f", p)] v <- numeric_version(vapply(p, function(python_path) tryCatch({ v <- suppressWarnings(system2( From 49ec37d136b29e43925b9b48fae00ec29bf0f99f Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Tue, 23 Apr 2024 08:03:07 -0400 Subject: [PATCH 2/2] add NEWS --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index b3c040bd7..c4266f812 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # reticulate (development version) +- `virtualenv_starter()` no longer warns when encountering broken symlinks (#1598). + # reticulate 1.36.1 - Fix issue where `py_to_r()` method for Pandas DataFrames would error