Updating miniconda with conda-forge conda and priority: strict

I"m having problems with a workflow that had been working for a while, but has been failing lately:

Start with miniconda
add the conda-forge channel
set chanel priority to strict

conda update conda

Fail :- ( – unresolvable dependencies :frowning:

I think the problem is that miniconda has a bunch (all) if its stuff from defaults, and then when I try to update it with conda-forge and strict, it all goes to heck.

Should this work? Or do I need to update conda without strict first, and then add strict to future updates (though, now that I think about it, I think that fails too in some cases, libc issues or ??)

Is the only (and best?) option to start with mini-forge instead?

NOTE: this is for a deployment docker image – we are not using environments, as there’s only one app running.

Another note / question:

Even with a fresh miniforge, I can’t update conda – what the heck?

  • Start with fresh miniforge install
  • put conda-forge at the top of the channel list
  • set channel_priority to strict
conda update conda 

updates various stuff, but not conda, even though there is indeed a newer version, and it even tells me that:

==> WARNING: A newer version of conda exists. <==

  current version: 23.3.1
  latest version: 23.9.0
Please update conda by running
  
$ conda update -n base -c conda-forge conda

then I try:

     conda install conda=23.9.0

and it churns away for a long time, but ultimately can’t resolve the dependencies.

It says that maybe “strict” is causing the problem, but how it that possible with miniforge and only conda-forge packages installed?

What’s up? – it seems this should work with fresh installs!

OK – having a nice conversation with myself now :slight_smile:

I tried setting the solver to libmamba:

conda config --set solver libmamba

and now

conda  update conda

still doesn’t work, but

conda install conda=23.9.0

does work – but it removes mamba.

trying to reinstall mamba results in downgrading conda again:

$ conda install mamba                                         
Channels:                                                                                        
 - conda-forge
 - defaults
Platform: osx-64
...
The following NEW packages will be INSTALLED:

  mamba              conda-forge/osx-64::mamba-1.5.1-py310h6bde348_2 

The following packages will be DOWNGRADED:

  conda                              23.9.0-py310h2ec42d9_0 --> 23.7.4-py310h2ec42d9_0 

so it seems we have inconsistent mamba and conda -- sigh.

Chris, I’m not entirely sure, and @jaimergp can probably comment on this, but I believe there is an incompatibility between mamba/libmamba and latest conda. If you need latest conda for some reason you can try start a fresh env or removing mamba from the base env. However, I’m not sure latest conda have features that are worth it. I’d wait for things to settle down and upgrade both when they are compatible.

1 Like

Thanks – I think that’s indeed the case – seems a bit odd with the integration of miniforge and mamba, but oh well – I don’t have any need for latest conda, so I think I’m good for now.

@ChrisBarker-NOAA, I switch to using mambaforge instead of miniconda for precisely this kind of reason. You already have a compatible conda and mamba from the get-go.

1 Like

Yes, that’s correct. This is the constraint. The fix to resolve the incompatibility has been merged and pending release in mamba-org/mamba. Hopefully soon!

1 Like

@jaimergp: Awesome – thanks!