Mamba 2.0
This commit is contained in:
+13
-12
@@ -1,21 +1,19 @@
|
||||
# Mamba (conda replacement)
|
||||
alias mamba="micromamba"
|
||||
alias mamba-install="curl micro.mamba.pm/install.sh | zsh"
|
||||
alias mamba-install="zsh <(curl -L micro.mamba.pm/install.sh)"
|
||||
export MAMBA_ROOT_PREFIX="$HOME/.conda"
|
||||
|
||||
# Mamba initialize function
|
||||
mamba-init()
|
||||
{
|
||||
export MAMBA_EXE="$(which micromamba)";
|
||||
__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --prefix "$HOME/micromamba" 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
MAMBA_EXE="$(which micromamba)";
|
||||
__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --root-prefix "$HOME/micromamba" 2> /dev/null)"
|
||||
ret=$?
|
||||
if [ $ret -eq 0 ]; then
|
||||
eval "$__mamba_setup"
|
||||
else
|
||||
if [ -f "$MAMBA_ROOT_PREFIX/etc/profile.d/micromamba.sh" ]; then
|
||||
. "$MAMBA_ROOT_PREFIX/etc/profile.d/micromamba.sh"
|
||||
else
|
||||
export PATH="$MAMBA_ROOT_PREFIX/bin:$PATH"
|
||||
fi
|
||||
else
|
||||
echo "Failed to initialize mamba: Return code $ret."
|
||||
echo "(Note: I just updated the mamba arguments to use '--root-prefix' instead of '--prefix'.)"
|
||||
echo "(This is a change on mamba 2.0, if you're having issues please upgrade using mamba-install!)"
|
||||
fi
|
||||
unset __mamba_setup
|
||||
}
|
||||
@@ -33,4 +31,7 @@ fi
|
||||
if command -v 'pyenv' &> /dev/null; then
|
||||
eval "$(pyenv init -)"
|
||||
PATH=$(pyenv root)/shims:$PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
# This alias needs to be added after mamba-init
|
||||
alias mamba="micromamba"
|
||||
Reference in New Issue
Block a user