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

invalid suggestion in deprecated profile.d/mamba.sh? #3861

Open
3 tasks done
mathause opened this issue Mar 11, 2025 · 6 comments
Open
3 tasks done

invalid suggestion in deprecated profile.d/mamba.sh? #3861

mathause opened this issue Mar 11, 2025 · 6 comments

Comments

@mathause
Copy link

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Mambaforge or latest Miniforge

Search tried in issue tracker

posix

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

The deprecation warning for profile.d/mamba.sh suggests to call

mamba shell init -s posix

echo "WARNING: - rerun 'mamba shell init -s posix' to get the correct value"

However, this creates an error for me:

critical libmamba Support for other shells not yet implemented.

mamba info / micromamba info

libmamba version : 2.0.7
          mamba version : 2.0.7
           curl version : libcurl/8.12.1 OpenSSL/3.4.1 zlib/1.3.1 zstd/1.5.6 libssh2/1.11.1 nghttp2/1.64.0
     libarchive version : libarchive 3.7.7 zlib/1.3.1 liblzma/5.6.3 bz2lib/1.0.8 liblz4/1.10.0 libzstd/1.5.6
       envs directories : /home/mathause/.conda/envs
                          /home/mathause/.mambabase/envs
          package cache : /home/mathause/.conda/pkgs
            environment : base (active)
           env location : /home/mathause/.mambabase
      user config files : /home/mathause/.mambarc
 populated config files : /home/mathause/.condarc
                          /home/mathause/.mambabase/.condarc
       virtual packages : __unix=0=0
                          __linux=6.8.0=0
                          __glibc=2.35=0
                          __archspec=1=x86_64_v3
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
       base environment : /home/mathause/.mambabase
               platform : linux-64

Logs

environment.yml

~/.condarc

channels:
  - conda-forge

envs_dirs:
  - /home/mathause/.conda/envs

pkgs_dirs:
  - /home/mathause/.conda/pkgs
@mathause
Copy link
Author

mathause commented Mar 11, 2025

Maybe related - there seem to be two issues in the realized profile.d/mamba.sh file.

cat $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh

...

if [ -z "" ]; then
    ...
fi

__mamba_setup="$("/home/mathause/.mambabase//mamba" shell hook --shell posix 2> /dev/null)"
...
  1. ${MAMBA_ROOT_PREFIX} is missing (mabye because it was expanded at creation time?)

    if [ -z "${MAMBA_ROOT_PREFIX}" ]; then

  2. bin is missing from the path. Is CMAKE_INSTALL_BINDIR not set?

    __mamba_setup="$("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" shell hook --shell posix 2> /dev/null)"

    So CMAKE_INSTALL_DIR is defined in setup.py but no CMAKE_INSTALL_BINDIR is set.

    def CMAKE_INSTALL_DIR():


Ultimately this may all be irrelevant as the file will anyways be remove in v2.10.0. But it's a bit annoying in the meantime.

@hmaarrfk
Copy link
Contributor

i don't think it is a "matter of being annoying" but rather a matter of anybody moving from mamba 1.5 -> 2.0 having a broken system.

We just hit this in the wild today and it was rather disruptive.

Trying to run the suggested mamba commands to run init

$ mamba
bash: /home/mark/miniforge3//mamba: No such file or directory

On my bash shell, when I successfully run

/home/mark/miniforge3/condabin/mamba shell init -s bash

I get the following, when restarting my shell.

Error unknown MAMBA_EXE: "", filename must be mamba or micromamba

@entatic
Copy link

entatic commented Mar 11, 2025

Noticed same a few hours ago:
$ bash: /home/mansoor/miniforge3//mamba: No such file or directory

@hmaarrfk
Copy link
Contributor

Ps our workaround was to use conda to install mamba 1.

@chrisjonesBSU
Copy link

chrisjonesBSU commented Mar 12, 2025

i don't think it is a "matter of being annoying" but rather a matter of anybody moving from mamba 1.5 -> 2.0 having a broken system.

Agreed. Updating from 2.0.5 to 2.0.7 this morning broke my mamba. I reinstalled it, and updating directly from 1.5 to 2.07 and had the same issues. I can update from 1.5 to 2.05 without issue, though.

@mathause
Copy link
Author

I get the following, when restarting my shell.

Error unknown MAMBA_EXE: "", filename must be mamba or micromamba

I also see this every time a new terminal is opened. It's coming from

echo "Error unknown MAMBA_EXE: \"${MAMBA_EXE}\", filename must be mamba or micromamba" 1>&2

I think it happens because etc/profile.d/mamba.sh is executed before my .bashrc (where MAMBA_EXE is defined). This only happens since 2.0.6 (for me) but I cannot see a reason why that changed.

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

4 participants