mamba: conda 23.9.0 breaks mamba 1.5.1

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Mambaforge

Search tried in issue tracker

ensure

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

I do not have this problem with Conda, just with Mamba

Describe your issue

using mamba 1.5.1 and upgrading to conda 23.9.0 breaks mamba:

$ mamba info
Traceback (most recent call last):
  File "C:\Users\cpi-eng\miniconda3\Scripts\mamba-script.py", line 6, in <module>
    from mamba.mamba import main
  File "C:\Users\cpi-eng\miniconda3\Lib\site-packages\mamba\mamba.py", line 16, in <module>
    from conda.cli.common import (
ImportError: cannot import name 'ensure_name_or_prefix' from 'conda.cli.common' (C:\Users\cpi-eng\miniconda3\Lib\site-packages\conda\cli\common.py)

mamba info / micromamba info

n/a

Logs

No response

environment.yml

No response

~/.condarc

No response

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 22
  • Comments: 24 (9 by maintainers)

Commits related to this issue

Most upvoted comments

The repodata has been patched, mamba 1.5.1 now pins conda < 23.9.0, so a fresh install should work out of the box.

In the meantime mamba has been patched to support latest conda, we will release 1.5.2 with this fix in a few days.

Downgrading conda to 23.7.4 fixes the issue.

Can confirm that the updated versions are available now. Doing a mamba update --all it downloaded and installed Conda 23.9.0 and Mamba 1.5.2. Everything seems to be working fine so far, at least until the next minor Conda update 😛

why don’t mamba’s dependencies constrain the conda version???

It does, see https://github.com/conda-forge/mamba-feedstock/blob/f707a5abe0e1728326263035042ba49c505cb486/recipe/meta.yaml#L126. Unfortunately, sometimes conda releases minor versions that break backward compatibility.

Soo, what is the solution? Downgrade to previous version or?

the solution at this point is to downgrade conda (mentioned above)

conda install -n base conda==23.7.4
mamba --help  # works now!

When is the fix finally going to be released?

updates to conda breaking mamba has happened to me more than once. why don’t mamba’s dependencies constrain the conda version???

@JohanMabille Sorry, I was digging a bit deeper and I seem to have a different issue. My mamba (and conda too) simply says All requested packages already installed to any update commands. Looking with search is even missing some versions that I know exist. It started to appear after update to 1.5.1, but now even older versions (1.1.0 on one HPC) have this same problem, while they worked in the past (but on another HPC I have 0.15.3 which works fine, so it’s not just server-side issue either). I’ll open a new issue when I have some more time.

run mamba update --all in my base env (which was in 1.5.1) and mamba correctly updated to 1.5.2 with conda 23.9.0. All mamba commands working as expected (I updated my other envs with no problem, and they execute well). Thanks for the fix !

When is the fix finally going to be released?

As soon as the CI passes on the branch 1.x. I’m backporting the required bugfixes, and I will release as soon as I can (hopefully today).

Soo, what is the solution? Downgrade to previous version or? Trying to follow the linked discussion thread but not quite sure what to make of it, there’s some temporary fixes somewhere, then that the issue is fixed somewhere else.