Skip to content

Commit

Permalink
fix error when comparing numeric_version to numeric
Browse files Browse the repository at this point in the history
Fixes #1544
  • Loading branch information
t-kalinowski committed Sep 16, 2024
1 parent 1fc95e6 commit 5c768b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/virtualenv.R
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ virtualenv_module <- function(python) {
if (python_has_module(python, "easy_install")) {
commands$push(paste("$", python, "-m easy_install --upgrade --user pip"))
} else if (is_ubuntu() && dirname(python) == "/usr/bin") {
package <- if (py_version < 3) "python-pip" else "python3-pip"
package <- if (py_version < "3") "python-pip" else "python3-pip"
commands$push(paste("$ sudo apt-get install", package))
} else {
commands$push("$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py")
Expand All @@ -462,7 +462,7 @@ virtualenv_module <- function(python) {
# then, recommend installation of virtualenv or venv with pip
commands$push(paste("Install", modules[[1]], "with:"))
if (is_ubuntu() && dirname(python) == "/usr/bin") {
package <- if (py_version < 3) "python-virtualenv" else "python3-venv"
package <- if (py_version < "3") "python-virtualenv" else "python3-venv"
commands$push(paste("$ sudo apt-get install", package))
} else {
commands$push(paste("$", python, "-m pip install --upgrade --user", module))
Expand Down

0 comments on commit 5c768b2

Please sign in to comment.