I am having so much trouble with what I assume is a conflict between conda and homebrew. When I run my code with the line print(sys.executable)
, this is the output:
/Users/user/opt/anaconda3/bin/python
Even though my interpreter in VSCode is set to this:
/opt/homebrew/bin/python3.9
So I tried doing conda deactivate
. But when I did this, I get this error:
zsh: command not found: python
I’ve seen some advice online saying it might have to do with conda being initialized automatically. So I went into my .bash_profile and commented out all of this:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/user/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2$
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/user/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/user/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/user/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
and I did something similar in .zshrc
But this seems like it’s producing other problems. I can’t deactivate the conda environment now and the output is ‘print(sys.executable)` remains the same.
If anyone needs more info from me, I will gladly provide it.