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 <<<
~
~
~
~
~
~
CodePudding user response:
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
CodePudding user response:
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