Skip to content

Commit

Permalink
Merge pull request #1496 from rstudio/fix/ubuntu22-venv
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski authored Oct 20, 2023
2 parents 99f14f2 + 126e75f commit 5d0a9a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# reticulate (development version)

- Fixed issue where `virtualenv_create()` would error on Ubuntu 22.04 when
using the system python as a base. (#1495, fixed in #1496).

# reticulate 1.34.0

# reticulate 1.33.0
Expand Down
2 changes: 1 addition & 1 deletion R/virtualenv.R
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ virtualenv_module <- function(python) {
# `apt install python3` makes an importable venv module, but not one
# capable of actually creating a venv unless python3-venv is installed.
# if python3-venv is not installed, move on and maybe discover virtualenv.
if (!any(grepl("^python[0-9.]*-venv$", system("dpkg -l", intern = TRUE))))
if (!any(grepl("\\bpython[0-9.]*-venv\\b", system("dpkg -l", intern = TRUE))))
next
}
return(module)
Expand Down

0 comments on commit 5d0a9a5

Please sign in to comment.