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

micromamba activate with symlinks has divergent behavior from other conda based tooling #3557

Open
3 tasks done
amgcc opened this issue Oct 22, 2024 · 0 comments
Open
3 tasks done

Comments

@amgcc
Copy link

amgcc commented Oct 22, 2024

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?

Micromamba

Search tried in issue tracker

symlink

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

I create environments using a hash of the package lists into an envs folder. In my envs folder is a symlink to the current environment. With conda and mamba, I can use conda activate envs/py38 or mamba activate envs/py311 and the PS1 prefix is modified on path correctly shows the symlink I used to activate. Now with micromamba, it resolves the symlink and shows the hash which is quite frustrating because this causes confusion for our users. I wrote my own wrapper around micromamba to fix this on both windows and linux which was a lot of work. However even this wrapper doesn't fix other tools that use the mamba ecosystem like starship which provides a nice console experience but I would have to customize this tool to fix this limitation in micromamba. Is this working as intended or is there any possibility we can keep the behavior the same as it was in conda and mamba?

user@host $ ls -l envs
total 12
drwxr-xr-x 26 user group 4096 Oct 14 22:34 57c8ba1ce0d7449663aac75b3b8ad9fc96ec6d13
drwxr-xr-x 26 user group 4096 Oct  6 13:19 ad0ce77233400327e32fe366efaf66790521e182
lrwxrwxrwx  1 user group 40 Oct 14 22:34 py311 -> 57c8ba1ce0d7449663aac75b3b8ad9fc96ec6d13
lrwxrwxrwx  1 user group 40 Oct  6 13:19 py38 -> ad0ce77233400327e32fe366efaf66790521e182
user@host $ conda activate envs/py311
(py311) user@host $

vs

user@host $ micromamba activate envs/py311
(57c8ba1ce0d7449663aac75b3b8ad9fc96ec6d13) user@host $

mamba info / micromamba info

❯ micromamba info

       libmamba version : 2.0.2
     micromamba version : 2.0.2
           curl version : libcurl/8.10.1 OpenSSL/3.3.2 zlib/1.3.1 zstd/1.5.6 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.4 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.6
       envs directories : /home/user/micromamba/envs
          package cache : /home/user/.conda/pkgs
            environment : /home/user/repo/envs/57c8ba1ce0d7449663aac75b3b8ad9fc96ec6d13 (active)
           env location : /home/user/repo/envs/57c8ba1ce0d7449663aac75b3b8ad9fc96ec6d13
      user config files : /home/user/.mambarc
 populated config files : /home/user/.condarc
       virtual packages : __unix=0=0
                          __linux=5.14.0=0
                          __glibc=2.34=0
                          __archspec=1=x86_64_v4
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
       base environment : /home/user/micromamba
               platform : linux-64


### Logs

_No response_

### environment.yml

_No response_

### ~/.condarc

```yaml
❯ cat ~/.condarc
channels:
  - conda-forge
pkgs_dirs:
  - /home/user/.conda/pkgs
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

1 participant