(base) root@53e0879f8237:~# vim ~/.bashrc
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/xxx/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/xxx/anaconda3/etc/profile.d/conda.sh" ]; then
. "/xxx/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/xxx/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
或者
export PATH=$PATH:/xxx/anaconda3/bin
Esc
退出编辑模式
:wq
保存并退出
source ~/.bashrc
激活
(base) root@53e0879f8237:~# source ~/.bashrc
还不快抢沙发