79341013

Date: 2025-01-08 23:46:33
Score: 0.5
Natty:
Report link

I see that you were already able to resolve this yourself. However, I ran into a similar error message/conflict issue when trying to update a conda environment that had substantially diverged from the version I currently have that was built from a YAML file.

Since the issue I had is related and builds on the YAML suggestion by @merv, here's what worked (and confirmed with our maintainer as better than trying to fix individual conflicts):

  1. Active the current version of environment (that doesn't have the update you want), e.g.
conda activate env_name
  1. Make a copy of the revision list for the current (active) environment, e.g.
conda list --revisions > ~/env_name-revision-list.txt
  1. Make a copy of the requirements for the current (active) environment, in case you need to reproduce it or use it in the future, e.g.
conda list - e > ~/env_name-requirements.txt
  1. Then deactivate the current (active) version of the environment and then delete the conda environment - by name if named but can be safer to point to file path. Note: deactivate and deletion commands might differ in syntax depending on what version of conda you are running, this worked with v4.14:
conda activate # deactivate env_name
conda env remove -p path_to_environment # e.g. ~/anaconda3/envs/env_name

After completely removing the existing environment that had the conflict(s), then you can proceed with creating the updated environment (with the same name) from a YAML file with the most recent versions, e.g. conda env create -f /path_to_envs/envs/env_name.yaml

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @merv
  • Low reputation (1):
Posted by: dkcoxie