Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda 23.9.0 breaks mamba 1.5.1 #2882

Closed
2 tasks done
aqc-carlodri opened this issue Oct 2, 2023 · 24 comments
Closed
2 tasks done

conda 23.9.0 breaks mamba 1.5.1 #2882

aqc-carlodri opened this issue Oct 2, 2023 · 24 comments

Comments

@aqc-carlodri
Copy link

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

@KrOstir
Copy link

KrOstir commented Oct 2, 2023

Having the same issue. After updating mamba with mamba update --all all mamba commands give the ImportError. conda commands work as expected.

@aqc-carlodri
Copy link
Author

Downgrading conda to 23.7.4 fixes the issue.

@jonashaag
Copy link
Collaborator

See #2878

@sweettyler

This comment was marked as duplicate.

@jtabox
Copy link

jtabox commented Oct 3, 2023

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.

@kaczmarj
Copy link

kaczmarj commented Oct 3, 2023

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!

@JohanMabille
Copy link
Member

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.

@norweeg
Copy link

norweeg commented Oct 5, 2023

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

@JohanMabille
Copy link
Member

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.

@rgoubet
Copy link

rgoubet commented Oct 13, 2023

When is the fix finally going to be released?

@lightlySkewed
Copy link

When is the fix finally going to be released?

I'm curious about this as well.

@andreiprodan
Copy link

@adamlynton thanks, works!

@JohanMabille
Copy link
Member

JohanMabille commented Oct 16, 2023

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).

@JohanMabille
Copy link
Member

I've just release 1.5.2, updating the feedstock now. If you want to give it a try from source in the meantime, you can checkout https://github.com/mamba-org/mamba/tree/1.x

@JohanMabille
Copy link
Member

JohanMabille commented Oct 17, 2023

@adamlynton I'm going to open a PR to update miniforge. But this may take some time before the installer is available. Downloading the zip from this repo means building mamba from source (and therefore, getting all its dependencies, which is a nightmare without a package manager).

What is the issue of installing a fresh miniforge (even if not the latest mamba), and then upgrade mamba in this new fresh install?

@jtabox
Copy link

jtabox commented Oct 17, 2023

@adamlynton I'm going to open a PR to update miniforge. But this may take some time before the installer is available. Downloading the zip from this repo means building mamba from source (and therefore, getting all its dependencies, which is a nightmare without a package manager).
What is the issue of installing a fresh miniforge (even if not the latest mamba), and then upgrade mamba in this new fresh install?

@JohanMabille, If I install a fresh minforge, then because of Conda 23.9.0, I don't think mamba will work, so I can't use it to update itself to1.5.2. I can't use Conda either, it never resolves. Would be good if there was a set of .exe and .dll's for 1.5.2. for Win 11 x64 with their appropriate destination directories that I could just download and add. Once mamba is up I can fix all the other issues with Conda, etc.

Unless I misunderstood you, installing a fresh miniforge will install and use Conda 23.7.4 because Conda 23.9.0 has now been marked as incompatible with the current Mamba version 1.5.1. So you will get a fully working Conda/Mamba install, which is your goal I assume? And as soon as the new Mamba version 1.5.2 is available, Conda 23.9.0 will also unlock for upgrades.

@JohanMabille
Copy link
Member

If I install a fresh minforge, then because of Conda 23.9.0, I don't think mamba will work, so I can't use it to update itself to1.5.2.

mamba will work, for the reasons @jtabox exposed above. Also notice that mamba still depends on some parts from conda (and its dependencies), so it cannot be just a set of .exe and .dll (that is why we made an installer).

Installing the last miniforge, and then running mamba update mamba should upgrade mamba to 1.5.2 and conda to 23.9. If not, you can post the error here, we may have missed something.

@jtabox
Copy link

jtabox commented Oct 18, 2023

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 :P

@JohanMabille
Copy link
Member

The solution is to install miniforge, not Anaconda, and then update mamba. Anaconda comes with default channels which are not compatible with conda-forge and is not something we support.

@janxkoci
Copy link

Hmm, conda runs out of memory on my system (conda-forge is too big), which is why I use mamba in the first place. Any other suggestions, aside from reinstalling mamba and all my packages from scratch?

@JohanMabille
Copy link
Member

@janxkoci what issue do you have with mamba update --all ? If it does not work (please describe the behavior here, that should work now), I'm afraid you don't have the choice and need to reinstall miniforge.

@saimonduquet
Copy link

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 !

@JohanMabille
Copy link
Member

Closing this issue as fixed.

@janxkoci
Copy link

@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.

ianabc added a commit to callysto/2i2c-image that referenced this issue Nov 15, 2023
See [mamba/2992](mamba-org/mamba#2882). This
image is built on a new jupyter/minimal-image to avoid that problem.
Aside from that, it picks up the new curl and webp libraries

Signed-off-by: Ian Allison <iana@pims.math.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests