【问题标题】:Terminal -bash alias error after installing anaconda on macOS在 macOS 上安装 anaconda 后出现终端 -bash 别名错误
【发布时间】:2020-02-04 00:27:01
【问题描述】:

我有一台装有 macOS Mojave 10.14.6 (18G95) 的 MacBook Pro
我在我的系统上安装了带有 python 的 Anaconda。
从那时起,每当我打开终端时,我都会收到这些消息。

Last login: Sat Oct  5 22:53:55 on console
You have new mail.
bash: alias: added: not found
-bash: alias: by: not found
-bash: alias: Anaconda3: not found
-bash: alias: 2019.07: not found
-bash: alias: installer: not found
(base) Ayushs-MacBook-Pro:~ Ayush$ 

安装 Anaconda 不知何故弄乱了我的 .bash_profile。
这些是我的 .bash_profile 的内容

# Homebrew
export PATH=/usr/local/bin:$PATH

export PATH=/usr/local/sbin:$PATH

export GOOGLE_APPLICATION_CREDENTIALS=/Users/Ayush/Downloads/ayush-profectus-b02fa250957f.json

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/Ayush/Downloads/google-cloud-sdk/path.bash.inc' ]; then source '/Users/Ayush/Downloads/google-cloud-sdk/path.bash.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/Users/Ayush/Downloads/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/Ayush/Downloads/google-cloud-sdk/completion.bash.inc'; fi

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

这是什么意思?无论如何它会妨碍我的系统,
怎么去掉?

【问题讨论】:

    标签: python-3.x bash macos terminal anaconda


    【解决方案1】:

    改变这一行:

    alias gcc='gcc-8'# added by Anaconda3 2019.07 installer
    

    alias gcc='gcc-8'
    # added by Anaconda3 2019.07 installer
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-09
      • 2020-02-27
      • 1970-01-01
      • 2017-01-21
      • 2018-03-23
      • 1970-01-01
      • 1970-01-01
      • 2021-01-27
      相关资源
      最近更新 更多