which python
gives /Users/liuzhiyu/opt/anaconda3/bin/python3.8
My .bash_profile
:
# Setting PATH for Python 3.8
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}$"
export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
source "$HOME/.cargo/env"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/liuzhiyu/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/liuzhiyu/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/liuzhiyu/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/liuzhiyu/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
As I know, PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}$"
sets the path for python3.8.
I've tried to comment the lines involving anaconda, but it didn't work.
System: MacOS 12.0.1