Skip to content

Instantly share code, notes, and snippets.

@sam-ngu
Created June 14, 2021 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sam-ngu/3c6f26677c9992bca6e239f3b8e05fc9 to your computer and use it in GitHub Desktop.
Save sam-ngu/3c6f26677c9992bca6e239f3b8e05fc9 to your computer and use it in GitHub Desktop.
How to change default anaconda env in Unix based system.
# in ~/.bashrc
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/home/sam/anaconda3/bin/conda' shel$
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/home/sam/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/sam/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate py36 <------------------- here
else
\export PATH="/home/sam/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment