From 5c768b2b4d4dea72c033ed00eacc7cf2ecedee31 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Mon, 16 Sep 2024 10:00:13 -0400 Subject: [PATCH] fix error when comparing numeric_version to numeric Fixes #1544 --- R/virtualenv.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/virtualenv.R b/R/virtualenv.R index fca56b89..70677cf1 100644 --- a/R/virtualenv.R +++ b/R/virtualenv.R @@ -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") @@ -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))