0

I recently updated my 2019 macbook pro to macos big sur version 11.3. Before the update I had anaconda installed, had created virtual python 3 environments, installed jupyter notebook, and had added conda to my python path variable. I was able to activate conda env and launch jupyter notebook servers. I updated to big sur version 11.3 and now when I try to do anything with conda all I get is:

-bash: conda: command not found

I saw some posts that the issue may be caused by zsh being the new default. So I tried the commands below. Also tried switching my default terminal to zsh, but nothing has worked. So I switched back to bash.

Does anyone know what the issue might be and can you suggest how to fix it?

tried:

/System/Volumes/Data/anaconda3/bin/conda init zsh

tried:

source /System/Volumes/Data/anaconda3/bin/activate

output:

-bash: /System/Volumes/Data/anaconda3/bin/conda: /anaconda3/bin/python: bad interpreter: No such file or directory

code:

vim ~/.bash_profile

output:

# added by Anaconda3 2019.03 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~   

update:

I tried the first suggestion in the link below,

"source /System/Volumes/Data/anaconda3/bin/activate"

But got the usual conda not found.

Mas OS Big Sur update - Python3 / conda / pip not found

My anaconda home does seem to be in the same location mentioned in the second answer from the post above

"/System/Volumes/Data/anaconda3"

so maybe that's the issue.

Update:

tried updating path in bash_profile as below

got error below

conda info

-bash: /anaconda3/bin/conda: No such file or directory



# added by Anaconda3 2019.03 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/System/Volumes/Data/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/System/Volumes/Data/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/System/Volumes/Data/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/System/Volumes/Data/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~    

                                  
user3476463
  • 3,967
  • 22
  • 57
  • 117

3 Answers3

0

Try to find where all the condas are and then proceed accordingly (i.e. change the path in your scripts):

find / -name "*conda*" 2>/dev/null
Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • I added an update to my original post. My anaconda install directory appears to be "/System/Volumes/Data/anaconda3". So are you suggesting I update the Export Path to Export Path="/System/Volumes/Data/anaconda3/bin:$PATH" in my bash_profile script? – user3476463 Mar 17 '22 at 00:09
0

so after much googling, hacking, and swearing I got the second solution on this link to work:

Mas OS Big Sur update - Python3 / conda / pip not found

move your anaconda3

run the prefix rehome tool

re-initialize your conda

user3476463
  • 3,967
  • 22
  • 57
  • 117
0

I got the same problem when switching to Monterey and downloading Anaconda on it. Tried lots of commands but all failed, having different problems like conda commands not found/couldn't run python script/couldn't reinstall Anaconda/python etc. It took me hours to figure out the simplest solution is just to type "chsh -s /bin/zsh" to switch to zsh...I didn't even know bash and zsh would cause such problem

codingt
  • 1
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 22 '22 at 12:12