From e37df969c1641eda06ecf84f4ad63310f37f9183 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 29 Nov 2022 12:40:11 +0530 Subject: [PATCH] refactor(migrate_env): virtualenv -> venv --- bench/utils/bench.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bench/utils/bench.py b/bench/utils/bench.py index 8922814e..c324c063 100644 --- a/bench/utils/bench.py +++ b/bench/utils/bench.py @@ -175,10 +175,6 @@ def migrate_env(python, backup=False): nvenv = "env" path = os.getcwd() python = which(python) - virtualenv = which("virtualenv") - if not virtualenv: - raise FileNotFoundError("`virtualenv` not found. Install it and try again.") - pvenv = os.path.join(path, nvenv) # Clear Cache before Bench Dies. @@ -218,7 +214,7 @@ def migrate_env(python, backup=False): try: logger.log(f"Setting up a New Virtual {python} Environment") - exec_cmd(f"{virtualenv} --python {python} {pvenv}") + exec_cmd(f"{python} -m venv {pvenv}") # Install frappe first _install_app("frappe")