提问者:小点点

如何不在我的终端中添加conda,并从终端提示符前面删除(base)[重复]


我已经安装了conda,每次打开终端conda都会自动运行,并在终端提示符前放置一个(base)。我正试图关闭这个conda函数,需要这里的帮助才能完成。下面是我的。bash_profile,请告诉我如何修改它,默认情况下不要在终端中添加conda。谢谢

export PATH="~/go/bin:$PATH"
export PATH="~/.local/bin:$PATH"
# added by Anaconda3 2019.07 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/zwang/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/Users/zwang/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/zwang/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/Users/zwang/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

. ~/.bashrc

共1个答案

匿名用户

我从这篇文章中找到了解决方案:https://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt

This can also be because auto_activate_base is set to True. You can check this using the following command

conda config --show | grep auto_activate_base
To set it false

conda config --set auto_activate_base False
source ~/.bashrc
To reactivate set it to True

conda config --set auto_activate_base True
source ~/.bashrc