Conda安装python快捷方式



我已经使用CLI安装了Anaconda。

它修改了我的~/.bash_profile如下:

# >>> 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"  # commented out by conda initialize
CONDA_CHANGEPS1=false conda activate base
else
export PATH="/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/Solal/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/Solal/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/Solal/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/Solal/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<

安装程序创建了一个文件.bash_profile-anaconda3.bak,如下所示:export PATH=/usr/local/bin:/usr/local/sbin:${PATH}

我不明白当我尝试运行python命令时,它会使用MacOS默认的python版本

哪个python返回:/usr/bin/python

如何使我的蟒蛇成为默认的蟒蛇?

感谢您的帮助

在完成必要的修改后获取./bash_profile。这样做将执行作为参数传递的文件的内容。

在航站楼:

source ~/.bash_profile

最新更新