3. 说明
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
run the following command when conda is activated:
conda config --set auto_activate_base false
You can undo this by running conda init --reverse$SHELL? [yes|no][no]>>>
当你安装 Conda 或运行 conda init 命令时,它会提示是否更新 shell 配置文件以在终端启动时自动激
活 Conda 的 base 环境。这是一个个人偏好的问题,你可以根据需要选择 yes 或 no:
选择 yes:
作用:
Conda 的初始化脚本会添加到你的 shell 配置文件中(如 .bashrc 或 .zshrc)。
每次打开终端时,Conda 的 base 环境会自动激活,且命令行提示符会显示激活状态。
适合:
如果你经常使用 Conda 环境,并希望快速进入 base 环境。
选择 no:
作用:
Conda 不会修改你的 shell 配置文件。
终端启动时不会自动激活 base 环境。
适合:
如果你希望终端保持干净的状态,按需手动激活 Conda 环境。
后续更改选项:
1. 不想自动激活 base 环境: 在终端中运行:
conda config --set auto_activate_base false
这不会修改 Conda 初始化,但会阻止其自动激活。
2. 撤销 Conda 初始化: 如果你想完全移除 Conda 的 shell 初始化:
conda init --reverse3. 手动重新初始化: 如果选择了 no,但以后想激活:
conda init