文章目录
设置环境变量
shell
cd
vim .zshrc
输入一下内容
shell
# 配置Conda
CONDA_HOME=/Users/hanliqiang/miniconda3
PATH=$CONDA_HOME/bin:$PATH
生效配置
shell
source .zshrc
设置自启动
shell
conda init zsh
.zshrc 文件中将会出现以下内容
shell
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/<user>/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/<user>/miniconda3/etc/profile.d/conda.sh" ]; then
. "/Users/<user>/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/<user>/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
参考
Mac安装Conda https://www.cnblogs.com/qwangg/p/18183128