-
Notifications
You must be signed in to change notification settings - Fork 371
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 >v1.4.5 broken with cygwin #2683
Comments
I think we should use the equivalent of |
I wonder why this hasn't been found in the tests. |
Yes, i think the assumption should hold in general and would solve my issue! |
I can't build micromamba in the enterprise environment im in. I could test out the artifacts from the CI builds, however the CI Build micromamba - win-64 is failing |
That should be a temporary VCPKG issue 🤞 |
Let's hope microsoft/vcpkg#32600 is fixed soon 😅 |
The PR still replaces the $MAMBA_EXE with a path in windows format
After discovering more issues with cygwins cygdrive i abandonned cygwin for gits bash.exe. gits bash.exe can handle paths in windows format so micromamba 1.4.9 works. |
I'll reopen because it's not fixed. |
as this is related with unix shells on windows, saying just for recrods; that micromamba 1.4.9 works fine with msys2 3.4.7.x86_64. |
@goyalyashpal Hello friend. I'm using msys2 with zsh as shell(not Git Bash) but I cannot get micromamba working. Could you please give me some instructions about the details of how to make it run? Appreciate it a lot. |
hi! i may have helped, but i don't have enough information. read here: https://tinyurl.com/stack-checklist/ and here: http://catb.org/~esr/faqs/smart-questions.html#beprecise |
@goyalyashpal The reason I did this is that msys2 do not recognize windows path (e.g. 'C:\micromamba\micromamba.exe') that called in the shell hook. But when I tried to activate a certain env, here's the output: (eval):.:7: no such file or directory: C:\Users\vickunwu\scoop\persist\micromamba\mamba\envs\whisperx\etc\conda\activate.d\openssl_activate.sh^M I guess it's the same issue but this time I'm not able to do hacks anymore as it's controlled by the program. |
$ micromamba activate
critical libmamba Shell not initialized
'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 bash shell, run:
$ eval "$(micromamba shell hook --shell bash)"
and then activate or deactivate with:
$ micromamba activate
To automatically initialize all future (bash) shells, run:
$ micromamba shell init --shell bash --root-prefix=~/micromamba
If your shell was already initialized, reinitialize your shell with:
$ micromamba shell reinit --shell bash
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}.
$ eval "$(micromamba shell hook --shell bash)"
$ micromamba activate
warning libmamba 'root_prefix' set with default value: C:\Users\...\micromamba
(base)
$
why not use forward slashes? |
I'm not clear about where should I use forward slashes. I think '' should be processed as it's an escape character. Here's my output of executing eval "$(micromamba shell hook -s bash)"
zsh: parse error near `^M' I'm using msys_shell.cmd to spawn a mingw64 session in Windows terminal. Does this make a difference? I think the output is a CRLF/LF issue. However, as the shell hook contains lines like I've tried dos2unix but it still messes the shell hook. |
that script is no longer required as there are dedicated .exe launchers now. but i launch the bash session directly from konsole or wezterm terminal. konsole allows picking default shell in its settings - i picked bash there. i have faint memory that there probably were some problems on invoking from cmd, but can't say for sure also, have u tried invoking activation command from bash? |
i installed micromamba directly - without using scoop. just guessing here - that as scoop is windows only, and u seemed to be facing errors in that direction - so, maybe try direct install of micromamba too. https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#umamba-install |
I tried bash this time, and it works on both launcher and cmd without any problem. I guess that's a zsh issue. I'm sad to say that I use Msys2 mainly because it's native support for zsh. Otherwise, I would rather use Git Bash as it seems to have less compatibility issues. Maybe I should open another issue. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@0xbe7a and I discovered a quick fix that you can use as long as this is not fixed and you don't want to abandon Cygwin:
|
Troubleshooting docs
How did you install Mamba?
Micromamba
Search tried in issue tracker
yes
Latest version of Mamba
Tried in Conda?
Not applicable
Describe your issue
I'm using micromamba with cygwin. My .bash_profile looks like
With micromamba <=1.4.5
shell hook --shell bash
checked if!hook_source_path().empty()
and if true just emitted the file shell hook without substituting$MAMBA_EXE
. Only ifhook_source_path()
was empty wouldget_hook_contents
be used to emit the shell hook. Cruciallyget_hook_contents
replaced$MAMBA_EXE
with the path to the binary on its own. However, this produces a broken config, as the replaced path is in windows format which cant be opened by cygwins bash. PR #2631 changed the behavior ofshell hook
so thatget_hook_contents
is always used which breaks my cygwin config.I'm not really sure how to tackle this problem, but i think a
--no-replace
option for shell hook would solve my issue.mamba info / micromamba info
No response
Logs
No response
environment.yml
No response
~/.condarc
No response
The text was updated successfully, but these errors were encountered: