Skip to content

Commit 4e397bc

Browse files
committed
Re-install conda/mamba for every tljh upgrade (doesn't imply upgrade)
1 parent 7d8a848 commit 4e397bc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tljh/installer.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,10 @@ def ensure_user_environment(user_requirements_txt_file):
242242
)
243243
to_upgrade.append(pkg)
244244

245-
# force reinstall conda/mamba to ensure a basically consistent env
246-
# avoids issues with RemoveError: 'requests' is a dependency of conda
247-
# only do this for 'old' conda versions known to have a problem
248-
# we don't know how old, but we know 4.10 is affected and 23.1 is not
249-
if not is_fresh_install and V(package_versions.get("conda", "0")) < V("23.1"):
245+
# force reinstall conda/mamba to ensure conda doesn't raise error
246+
# "RemoveError: 'requests' is a dependency of conda" later on when
247+
# conda/mamba is used to install/upgrade something
248+
if not is_fresh_install:
250249
# force-reinstall doesn't upgrade packages
251250
# it reinstalls them in-place
252251
# only reinstall packages already present

0 commit comments

Comments
 (0)