Last active
August 23, 2022 17:21
-
-
Save yogeshvar/d168249188742eb015aa1a6c09b2d177 to your computer and use it in GitHub Desktop.
MiniForge & MiniConda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: source ~/.zshrc m1 | |
if [[ $1 = "m1" ]]; then | |
pkg=miniforge3 | |
else | |
# default is miniconda3 | |
pkg=miniconda3 | |
fi | |
echo "Using $pkg" | |
__conda_setup="$(`~/$pkg/bin/conda` 'shell.bash' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "~/$pkg/etc/profile.d/conda.sh" ]; then | |
. "~/$pkg/etc/profile.d/conda.sh" # commented out by conda initialize | |
else | |
export PATH="~/$pkg/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment