Created
May 19, 2024 08:25
-
-
Save kameshsampath/7f13ef7ac8aeff8ac8102201aad3430c to your computer and use it in GitHub Desktop.
Autoload conda environment using direnv
This file contains 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
# assumes miniconda is installed on user home | |
# direnv can be installed using brew install direnv or other OS specific methods | |
use_conda(){ | |
local conda_setup="$("$HOME/miniconda3/bin/conda" 'shell.zsh' 'hook' 2> /dev/null)" | |
eval "$conda_setup" | |
conda activate <name of your conda environment to load> | |
} | |
strict_env | |
use conda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment