Skip to content

Instantly share code, notes, and snippets.

@pmody-medis
Created July 28, 2025 16:28
Show Gist options
  • Save pmody-medis/0ec38fd262837eabd4d52a1bbe3fe9c6 to your computer and use it in GitHub Desktop.
Save pmody-medis/0ec38fd262837eabd4d52a1bbe3fe9c6 to your computer and use it in GitHub Desktop.
Multi Conda Installations

In your UNix system

# Define the variable
CONDA_PARENT_DIR="/parent/dir/of/miniconda3"

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$("${CONDA_PARENT_DIR}/miniconda3/bin/conda" 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "${CONDA_PARENT_DIR}/miniconda3/etc/profile.d/conda.sh" ]; then
        . "${CONDA_PARENT_DIR}/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="${CONDA_PARENT_DIR}/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
  • Confirm with conda info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment