问题描述:
(base) aq@pc:~/umi-on-legs/mani-centric-wbc$ mamba activate isaac
'mamba' 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 "$(mamba shell hook --shell bash)"
and then activate or deactivate with:
$ mamba activate
To automatically initialize all future (bash) shells, run:
$ mamba shell init --shell bash --root-prefix=~/.local/share/mamba
If your shell was already initialized, reinitialize your shell with:
$ mamba shell reinit --shell bash
Otherwise, this may be an issue. In the meantime you can run commands. See:
$ mamba run --help
Supported shells are {bash, zsh, csh, posix, xonsh, cmd.exe, powershell, fish, nu}.
critical libmamba Shell not initialized
问题解答:
图中已经解释清楚了,必须先初始化,然后才能创建环境,激活环境
你遇到的问题是 mamba
没有初始化当前的 shell 环境,导致无法使用 mamba activate
命令激活环境。解决方法是按照提示进行初始化。
请按照以下步骤操作:
1. 初始化当前 shell 环境
在你的终端中运行以下命令来初始化 mamba
:
eval "$(mamba shell hook --shell bash)"
2. 如果你希望自动初始化所有新的 shell 会话:
如果你希望以后每次打开新的终端都自动初始化 mamba
,可以运行以下命令:
mamba shell init --shell bash --root-prefix=~/.local/share/mamba
3.确认mamba是否安装成功
mamba --version
4.创建环境
如果你有 isaac.yml
文件,可以再次尝试创建环境:
mamba env create -f isaac.yml
5.激活环境即可
mamba activate isaac