-bash: conda: command not found

默认分类,Study 2025-02-12 17 次浏览 次点赞

(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

本文由 fmujie 创作,采用 知识共享署名 3.0,可自由转载、引用,但需署名作者且注明文章出处。

还不快抢沙发

添加新评论

召唤看板娘