Miniconda Config

Install

1
2
curl -o Miniconda3-latest-MacOSX-x86_64.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh

Command

1
2
3
4
5
6
conda init # 初始化
conda config --show # 打印配置
conda config --set auto_activate_base false # 打开terminal时自动初始化开关
eval "$(/Users/xxxx/miniconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
# YOUR_SHELL_NAME 替换成你使用的 shell,例如 bash 或 zsh
conda init --reverse $SHELL

bash_profile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/xxxx/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/xxxx/miniconda3/etc/profile.d/conda.sh" ]; then
. "/Users/xxxx/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/xxxx/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<

Author

Gavin

Posted on

2018-02-13

Updated on

2018-02-13

Licensed under

Comments