使用内置安装程序安装anaconda后终端an / or bash.profile出现问题

时间:2019-02-18 03:16:26

标签: python terminal anaconda

我试图在Mac上设置Anaconda3和Python,并使用内置安装程序安装Anaconda软件包。它应该更新我的bash_profile,但是现在每当我在终端中打开一个新窗口并且以root用户身份被卡住(在命令行上为#)时,我都会不断收到错误"-bash: added: command not found"。我对编码还很陌生,一直在尝试寻找解决方案,但似乎没有任何效果。如果删除Anaconda添加到我的bash_profile中的内容,则此问题已解决,因此我被认为是代码中存在冲突。任何建议,将不胜感激,特别是如果以一种成熟的编码器可以理解的方式进行解释。我当前的bash_profile如下:


Date

# Enable tab completion
source ~/.udacity-terminal-config/git-completion.bash

# Change command prompt
source ~/.udacity-terminal-config/git-prompt.sh

# colors!
red="\[\033[38;5;203m\]"
green="\[\033[38;05;38m\]"
blue="\[\033[0;34m\]"
reset="\[\033[0m\]"

export GIT_PS1_SHOWDIRTYSTATE=1

# '\u' adds the name of the current user to the prompt
# '\$(__git_ps1)' adds git-related stuff
# '\W' adds the name of the current directory
export PS1="$red\u$green\$(__git_ps1)$blue \W
$ $reset"# 

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

0 个答案:

没有答案