Skip to content

Instantly share code, notes, and snippets.

@prerakmody
Last active September 16, 2025 12:46
Show Gist options
  • Save prerakmody/ea5c03f50d1c84e42bd9f15b5144617e to your computer and use it in GitHub Desktop.
Save prerakmody/ea5c03f50d1c84e42bd9f15b5144617e to your computer and use it in GitHub Desktop.
Multiple Conda environments
# >>> conda initialize >>>
CONDA_BASE_PATH="/<path>/to/anaconda3}" # make sure to include ananconda3 or miniconda3 in this path
__conda_setup="$("${CONDA_BASE_PATH}/bin/conda" 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "${CONDA_BASE_PATH}/etc/profile.d/conda.sh" ]; then
. "${CONDA_BASE_PATH}/etc/profile.d/conda.sh"
else
export PATH="${CONDA_BASE_PATH}/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment