Skip to content

Instantly share code, notes, and snippets.

@moraisaugusto
Last active September 4, 2023 13:22
Show Gist options
  • Save moraisaugusto/79721cf5f18b5007e50a313d1e894b04 to your computer and use it in GitHub Desktop.
Save moraisaugusto/79721cf5f18b5007e50a313d1e894b04 to your computer and use it in GitHub Desktop.
asdf + conda
`.tool-versions`
```
python anaconda3-2021.11
```
create a `.local_zshrc` file
```
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/<<username>>/.asdf/installs/python/anaconda3-2021.11/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/<<username>>/.asdf/installs/python/anaconda3-2021.11/etc/profile.d/conda.sh" ]; then
. "/Users/<<username>>/.asdf/installs/python/anaconda3-2021.11/etc/profile.d/conda.sh"
else
export PATH="$PATH:/Users/<<username>>/.asdf/installs/python/anaconda3-2021.11/bin"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
```
So now what I do whenever I need to use conda, type
```source .local_zshrc```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment