From 4e397bc687b73c68ee96557db2daddcbb13f66c6 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 26 Feb 2024 09:40:00 +0100 Subject: [PATCH] Re-install conda/mamba for every tljh upgrade (doesn't imply upgrade) --- tljh/installer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tljh/installer.py b/tljh/installer.py index aff24fc..5a9d767 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -242,11 +242,10 @@ def ensure_user_environment(user_requirements_txt_file): ) to_upgrade.append(pkg) - # force reinstall conda/mamba to ensure a basically consistent env - # avoids issues with RemoveError: 'requests' is a dependency of conda - # only do this for 'old' conda versions known to have a problem - # we don't know how old, but we know 4.10 is affected and 23.1 is not - if not is_fresh_install and V(package_versions.get("conda", "0")) < V("23.1"): + # force reinstall conda/mamba to ensure conda doesn't raise error + # "RemoveError: 'requests' is a dependency of conda" later on when + # conda/mamba is used to install/upgrade something + if not is_fresh_install: # force-reinstall doesn't upgrade packages # it reinstalls them in-place # only reinstall packages already present