Skip to content

Instantly share code, notes, and snippets.

@jojonki
Last active February 20, 2021 17:58
Show Gist options
  • Save jojonki/808575aac293b0538ae4b108aefbb028 to your computer and use it in GitHub Desktop.
Save jojonki/808575aac293b0538ae4b108aefbb028 to your computer and use it in GitHub Desktop.
direnv for anaconda witch automatically switches anaconda environments.
activate_conda(){
eval "$(conda shell.zsh hook)"
conda activate $1
}
export THIS_CONDA_ENV=your_conda_env_name
activate_conda $THIS_CONDA_ENV
eval "$(direnv hook zsh)"
@ht55ght55
Copy link

Nicely done! So simple compared to many other solutions out there. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment