0

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 <<<
merv
  • 67,214
  • 13
  • 180
  • 245
yudhiesh
  • 6,383
  • 3
  • 16
  • 49
  • I'm skeptical about the inference to causality. I've done the exact same update with no issue (also using `zsh` as default shell). Was there anything else in the `.zshrc` that possibly crashed before getting to the Conda stuff? – merv Jun 20 '22 at 15:01
  • Aside from whatever you put into your .zshrc, did you actually **verify** that the PATH is set correctly by the time you are invoking `conda`? – user1934428 Jun 21 '22 at 14:03

1 Answers1

0

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

yudhiesh
  • 6,383
  • 3
  • 16
  • 49