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

Cannot use csh with micromamba #3333

Open
3 tasks done
abazabaaa opened this issue Jun 27, 2024 · 2 comments · May be fixed by #3338
Open
3 tasks done

Cannot use csh with micromamba #3333

abazabaaa opened this issue Jun 27, 2024 · 2 comments · May be fixed by #3338
Labels
type::bug Something isn't working

Comments

@abazabaaa
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?

Micromamba

Search tried in issue tracker

csh or tcsh

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

micromamba is supposed to support csh, but when attempting to initialize the shell you get an error saying that csh is not a shell choice:

micromamba activate chemprop

'micromamba' is running as a subprocess and can't modify the parent shell.
Thus you must initialize your shell before using activate and deactivate.

To initialize the current csh shell, run:
$ eval "$(micromamba shell hook --shell csh)"
and then activate or deactivate with:
$ micromamba activate
To automatically initialize all future (csh) shells, run:
$ micromamba shell init --shell csh --root-prefix=~/micromamba
If your shell was already initialized, reinitialize your shell with:
$ micromamba shell reinit --shell csh
Otherwise, this may be an issue. In the meantime you can run commands. See:
$ micromamba run --help

Supported shells are {bash, zsh, csh, xonsh, cmd.exe, powershell, fish}.
critical libmamba Shell not initialized

micromamba shell init --shell csh --root-prefix=~/micromamba_csh
--shell: csh not in {bash,cmd.exe,dash,fish,posix,powershell,tcsh,xonsh,zsh}
Run with --help for more information.

Then if trying to use tcsh instead you get another error:
micromamba shell init --shell tcsh --root-prefix=~/micromamba_csh
critical libmamba Support for other shells not yet implemented.

mamba info / micromamba info

libmamba version : 1.5.8
     micromamba version : 1.5.8
           curl version : libcurl/8.6.0 OpenSSL/3.2.1 zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.5
       envs directories : xxx/envs
                          xxx/envs
          package cache : xxx/conda/pkgs
            environment : None (not found)
           env location : -
      user config files : /home/xxx/.mambarc
 populated config files : /home/xxx/.condarc
       virtual packages : __unix=0=0
                          __linux=3.10.0=0
                          __glibc=2.17=0
                          __archspec=1=x86_64-v4
                          __cuda=11.4=0
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/openeye/linux-64
                          https://conda.anaconda.org/openeye/noarch
       base environment : /home/grahat12/micromamba
               platform : linux-64

Logs

No response

environment.yml

No response

~/.condarc

No response

@Hind-M
Copy link
Member

Hind-M commented Jul 3, 2024

This indeed looks like a bug. Thanks for reporting!

@Hind-M Hind-M added the type::bug Something isn't working label Jul 3, 2024
@Hind-M Hind-M linked a pull request Jul 3, 2024 that will close this issue
2 tasks
@zworkinspace
Copy link

zworkinspace commented Aug 29, 2024

The micromamba.csh script fails in csh or tcsh due to the line:

set ask_conda="\(setenv prompt "${prompt}"; __mamba_exe shell "!*" --shell csh)`"`

With error:

Unmatched '''.

Sadly, while I hate using csh or tcsh, preferring zsh or at least bash, many of my colleagues need to run in csh due to legacy tools. Not having a workable micromamba executable is annoying.

I'd suggest refactoring micromamba.csh to avoid battleship aliases with four levels of quoting, which csh handles so poorly. Apologies, I don't have the cycles right now to contribute a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants