Home > Software design >  Upgrading to macOS Big Sur(11.6.7) causes zsh not to find conda
Upgrading to macOS Big Sur(11.6.7) causes zsh not to find conda

Time:06-24

I just upgraded to macOS Big Sur(11.6.7) from a lower version of macOS Big Sur and I am running into this error zsh: command not found: conda.

I referred to other similar questions such as Zsh: Conda/Pip installs command not found and Mas OS Big Sur update - Python3 / conda / pip not found but none of the answers solves my issue.

I already have a block to initialise conda within my ~/.zshrc, which should solve this issue in the first place and I have always had it prior to upgrading so I am unsure what is causing this issue:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/yravindranath/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/yravindranath/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/yravindranath/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/yravindranath/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

CodePudding user response:

Uninstalling anaconda using rm -rf ~/opt/anaconda3/ and reinstalling it fixes it. Not sure what was causing the issue in the first place.

  • Related