【问题标题】:how to not make conda up in my terminal and remove (base) from the front of my terminal prompt [duplicate]如何不在我的终端中制作 conda 并从我的终端提示符前面删除 (base) [重复]
【发布时间】:2019-12-22 19:02:37
【问题描述】:

我已经安装了 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

【问题讨论】:

    标签: bash macos conda


    【解决方案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
    

    【讨论】:

      猜你喜欢
      • 2019-08-05
      • 2013-12-12
      • 2017-07-29
      • 2021-08-17
      • 2023-03-10
      • 2012-03-29
      • 2015-04-06
      • 2017-11-13
      • 1970-01-01
      相关资源
      最近更新 更多