0

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

Lluvio Liu
  • 11
  • 1
  • I do know that the default shell for macOS Monterey isn't bash, but which shell is part of the user configuration. If this is being run, the __conda_setup variable has some commands that adjust the value of `PATH`, The entire block within the `conda initialize` comments need to be commented out as well.. – Ben Y Jan 28 '22 at 23:13
  • Do not comment out the Conda initialization code. Instead follow the duplicate advice and configure Conda not to auto-activate **base**. – merv Jan 30 '22 at 20:13
  • @BenY that is not a good suggestion – merv Jan 30 '22 at 20:14
  • My interpretation of "I've tried to comment the lines" was that he only did a few of the lines. With the information given, there's not a whole lot we can infer, but my understanding is that he didn't want it to run Anaconda. – Ben Y Jan 31 '22 at 05:20

0 Answers0