Ubuntu22.04安装Anaconda后手动初始化
最后一步初始化没有输入yes,只能手动进行初始化,未进行初始化的最后一步的提示信息如下:
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
eval "$(/home/$USER/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
To install conda's shell functions for easier access, first activate, then:
conda init
If you'd prefer that conda's base environment not be activated on startup,
set the auto_activate_base parameter to false:
conda config --set auto_activate_base false
Thank you for installing Anaconda3!
第一步
source ~/anaconda3/bin/activate
执行完后进入base环境,如下图所示:
第二步
conda init
执行完后出现的提示的最后一行如下:
==> For changes to take effect, close and re-open your current shell. <==
关闭当前命令行,重新打开即可。
不放心可以执行如下命令验证:
cat ~/.bashrc # 查看环境变量,关于anaconda的在最后
conda -V # 查看conda版本