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

Mamba command not found (make mamba command available outside base environment) #34

Closed
martinRenou opened this issue Jun 11, 2019 · 18 comments

Comments

@martinRenou
Copy link
Member

I installed minimamba and create a minimal voila environment. The issue is that from the base environment I have the mamba command available, but whenever I activate the voila environment mamba is not available anymore...

mamba_trace

@wolfv wolfv changed the title Mamba command not found Mamba command not found (make mamba command available outside base environment) Jun 11, 2019
@wolfv
Copy link
Member

wolfv commented Jun 11, 2019

yep, indeed we need to figure out how to make the mamba command available outside the base environment! Thanks for reporting.

@xyu
Copy link

xyu commented Jul 9, 2019

This seems tricky because ideally we would want mamba to be in the user's PATH even when there is no active conda environment (post conda deactivate) as well so that mamba env create ... work regardless of which if any conda env is active. In our build process I'm just linking mamba to a bin dir which seems to work well:

ls -s "$(conda info --base)/bin/mamba" "/usr/local/bin/mamba"

@wolfv
Copy link
Member

wolfv commented Jul 9, 2019 via email

@wolfv
Copy link
Member

wolfv commented Jul 11, 2019

this is fixed for linux now -- need to confirm that it works on osx & win as well (win not yet released).

@wolfv wolfv closed this as completed Jan 16, 2020
@wolfv
Copy link
Member

wolfv commented Jan 16, 2020

fixed by putting a link to mamba in the condabin directory.

@sackh
Copy link

sackh commented Nov 26, 2020

is this fixed for Windows? I am still getting this error.

@wolfv
Copy link
Member

wolfv commented Nov 26, 2020

yep, should be fixed on windows, too.

What version do you have? Did you run conda init?

@sackh
Copy link

sackh commented Nov 27, 2020

I am using the latest version. I did try conda init but still the same error.

@wolfv
Copy link
Member

wolfv commented Nov 27, 2020

can you post conda info and the contents of your base env condabin folder?

@sackh
Copy link

sackh commented Nov 28, 2020

sorry for the late reply. It is working now, after reinstall.

@Haydnspass
Copy link

@wolfv I believe that does not work when one does not have write access to condabin, correct? I am on a shared cluster environment where the base environment and packages in general are managed centrally.
I tried

  • updating mamba
  • remove the env in which mamba was and reinstall
    But it still does not work.

image

@Haydnspass
Copy link

As a workaround adding mamba() { ~/.conda/envs/base_mamba/bin/mamba "$@" ;}to ~/.bashrc does the trick though

@drahnreb
Copy link

drahnreb commented Feb 4, 2021

for mambaforge on osx a simple mamba() { ~/mambaforge/bin/mamba "$@" ;} in .zshrc works too. tested on osx-arm64.

@connorads
Copy link

For anyone on macOS using Catalina or newer and thus have zsh instead of bash
conda init zsh

jonashaag pushed a commit to jonashaag/mamba that referenced this issue Feb 2, 2022
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@the-rich-piana
Copy link

As a workaround adding mamba() { ~/.conda/envs/base_mamba/bin/mamba "$@" ;}to ~/.bashrc does the trick though

Where did you add this in bashrc? It says my base env is micromamba but I can't seem to run 'mamba' in the terminal anywhere. Strangely enough, all my packages and the environment is working fine and being recognized by VScode.

image

@foobar41
Copy link

I still cannot run mamba in another environment, runs only in base. Can anyone help ? Should I add to path environments or something ?

@jonashaag
Copy link
Collaborator

Please create a new ticket using the issue template and show exactly what you did and what you expected

@lucidBrot
Copy link

lucidBrot commented Jun 6, 2023

This is still an issue. Installing with mambaforge-pypy first runs into the issue of missing DLLs. After manually copying the files to the correct location, mamba works in the miniforge base env, but is not found in an environment created with mamba create.

My workaround for now is this:

  • create a folder somewhere and inside it a link to the mamba.bat from mambaforge-pypy3\condabin\mamba.bat
  • add that folder to the path in the windows settings
  • use mamba.lnk instead of mamba for all commands once the env is activated
  • once that works, you can change the PATHEXT to include links, so you don't have to type .lnk

( cc @foobar41 maybe this helps you too )

The reason I made a new folder instead of adding condabin to the path is that I do not want the mamba's conda executables to clash with my existing conda installation.

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