Close

2020-11-13

Anaconda/Miniconda install/Update/Uninstall on MacOS.

Anaconda/Miniconda install/Update/Uninstall on MacOS

Installing on macOS

  1. Download the installer:
  2. Verify your installer hashes.
  3. Install:
    • Miniconda—In your terminal window, run:
      bash Miniconda3-latest-MacOSX-x86_64.sh



    • Anaconda—Double-click the .pkg file.
  4. Follow the prompts on the installer screens.
    If you are unsure about any setting, accept the defaults. You can change them later.
  5. To make the changes take effect, close and then re-open your terminal window.
  6. Test your installation. In your terminal window or Anaconda Prompt, run the command conda list. A list of installed packages appears if it has been installed correctly.

Installing in silent mode

Note

The following instructions are for Miniconda. For Anaconda, substitute Anaconda for Miniconda in all of the commands.

To run the silent installation of Miniconda for macOS or Linux, specify the -b and -p arguments of the bash installer. The following arguments are supported:

  • -b—Batch mode with no PATH modifications to ~/.bashrc. Assumes that you agree to the license agreement. Does not edit the .bashrc or .bash_profile files.
  • -p—Installation prefix/path.
  • -f—Force installation even if prefix -p already exists.

EXAMPLE:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh

bash ~/miniconda.sh -b -p $HOME/miniconda

The installer prompts “Do you wish the installer to initialize Miniconda3 by running conda init?” We recommend “yes”.

Note

If you enter “no”, then conda will not modify your shell scripts at all. In order to initialize after the installation process is done, first run source <path to conda>/bin/activate and then run conda init.

MacOS Catalina

If you are on macOS Catalina, the new default shell is zsh. You will instead need to run source <path to conda>/bin/activate followed by conda init zsh.

Updating Anaconda or Miniconda

  1. Open a terminal window.
  2. Navigate to the anaconda directory.
  3. Run conda update conda.

Uninstalling Anaconda or Miniconda

  1. Open a terminal window.
  2. Remove the entire Miniconda install directory with:
    rm -rf ~/miniconda
  3. OPTIONAL: Edit ~/.bash_profile to remove the Miniconda directory from your PATH environment variable.
  4. Remove the following hidden file and folders that may have been created in the home directory:
    • .condarc file
    • .conda directory
    • .continuum directory
  5. By running:
    rm -rf ~/.condarc ~/.conda ~/.continuum