【发布时间】:2019-11-23 17:17:32
【问题描述】:
当我在我的 Mac OS 中打开一个终端窗口(现在使用 Catalina,但在升级之前得到相同的行为)时,我收到以下消息 3 次:
Last login: Sat Nov 23 11:38:00 on ttys001
ERROR: The install method you used for conda--probably either `pip install conda`
or `easy_install conda`--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer. You can download the miniconda installer from
https://conda.io/miniconda.html.
.bash_profile文件有以下内容:
conda activate
conda activate
conda activate
# added by Anaconda3 2019.10 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
我怀疑conda activate 出现了三次,因为我已经安装了三次 anaconda。无论如何,如果我删除这三行并打开一个新的终端窗口,它不会抱怨。谁能解释这种行为并告诉我删除这三行的利弊?我应该删除文件的全部内容(即其他 16 行)吗?
【问题讨论】: