之前修改bash_profile文件导致anaconda的终端启动时出现,“进程已完成”。网上查询后发现一般出现“进程已完成”的情况时,bash_profile没有配置对,所以找到bash_profile文件,进行修改环境变量。
在终端输入命令
转到home目录:
$ cd ~
打开bash_profile文件
$ open .bash_profile
出现bash_profile的文本文件
添加anaconda的环境变量
# added by Anaconda3 5.3.0 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
. "/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<
保存文件然后source
source .bash_profile