记录安装Mambaforge遇到的坑

我安装的是zsh,安装Mambaforge的时候始终无法使用,运行mamba init显示下面的内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
no change     /home/lixiang/mambaforge/condabin/conda
no change /home/lixiang/mambaforge/bin/conda
no change /home/lixiang/mambaforge/bin/conda-env
no change /home/lixiang/mambaforge/bin/activate
no change /home/lixiang/mambaforge/bin/deactivate
no change /home/lixiang/mambaforge/etc/profile.d/conda.sh
no change /home/lixiang/mambaforge/etc/fish/conf.d/conda.fish
no change /home/lixiang/mambaforge/shell/condabin/Conda.psm1
no change /home/lixiang/mambaforge/shell/condabin/conda-hook.ps1
no change /home/lixiang/mambaforge/lib/python3.10/site-packages/xontrib/conda.xsh
no change /home/lixiang/mambaforge/etc/profile.d/conda.csh
modified /home/lixiang/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

Added mamba to /home/lixiang/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

折腾了好久,终于找到解决方法了。把.bashrc中下面的内容 复制粘贴到.zshrc就可以了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/lixiang/mambaforge/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/lixiang/mambaforge/etc/profile.d/conda.sh" ]; then
. "/home/lixiang/mambaforge/etc/profile.d/conda.sh"
else
export PATH="/home/lixiang/mambaforge/bin:$PATH"
fi
fi
unset __conda_setup

if [ -f "/home/lixiang/mambaforge/etc/profile.d/mamba.sh" ]; then
. "/home/lixiang/mambaforge/etc/profile.d/mamba.sh"
fi
# <<< conda initialize <<<
# conda

记录安装Mambaforge遇到的坑
https://lixiang117423.github.io/article/mambaerror/
作者
李详【Xiang LI】
发布于
2023年12月12日
许可协议