2

I have uninstalled anaconda3 according to the documentation and this stackoverflow entry by:

  1. Installing the cleaner

    $ conda install anaconda-clean

  2. Activating the 'base' virtual environment

    $ source ~/opt/anaconda3/bin/activate

  3. Running the cleaner

    (base) $ anaconda-clean --yes

  4. Deactivating the 'base' virtual environment

    (base) $ conda deactivate

  5. Removing the files

    $ rm -rf ~/opt/anaconda3

    $ rm -rf ~/opt/.anaconda_backup

  6. Deleting all lines added by conda from environment file(s)

Opening my .bash_profile file (for others might be .profile and/or .bashrc)

In my case I deleted these lines:

    # >>> conda initialize >>>
    # !! Contents within this block are managed by 'conda init' !!
    __conda_setup="$('/home/me/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
        eval "$__conda_setup"
    else
        if [ -f "/home/me/opt/anaconda3/etc/profile.d/conda.sh" ]; then
            . "/home/me/opt/anaconda3/etc/profile.d/conda.sh"
        else
            export PATH="/home/me/opt/anaconda3/bin:$PATH"
        fi
    fi
    unset __conda_setup
    # <<< conda initialize <<<

I quit the iTerm and I have restarted the my MacOS Catalina 10.15.7 on the next day. But when running echo $PATH I still get:

/Users/me/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin

What did I do wrong?

I veryfied that I saved the changes to ~/.bash_profile:

$ cat ~/.bash_profile
# history size
export HISTFILESIZE=1000000
export HISTSIZE=1000000
ilam engl
  • 1,310
  • 1
  • 9
  • 22

0 Answers0