Installing on macOS

  1. Download the installer:

  2. Install:

    • Miniconda—In your Terminal window, run:

      bash Miniconda3-latest-MacOSX-x86_64.sh
      
    • Anaconda—Double-click the .pkg file.

  3. Follow the prompts on the installer screens.

    If you are unsure about any setting, accept the defaults. You can change them later.

  4. To make the changes take effect, close and then re-open your Terminal window.

  5. Test your installation.

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 http://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"

NOTE: This sets the PATH only for the current session, not permanently. Trying to use conda when conda is not in your PATH causes errors such as “command not found.”

In each new bash session, before using conda, set the PATH and run the activation scripts of your conda packages by running:

source $HOME/miniconda3/bin/activate

NOTE: Replace $HOME/miniconda3/bin/activate with the path to the activate script in your conda installation.

To set the PATH permanently, you can add a line to your .bashrc file. However, this makes it possible to use conda without running the activation scripts of your conda packages, which may produce errors.

EXAMPLE:

export PATH="$HOME/miniconda3/bin:$PATH"

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. You may also:

  4. OPTIONAL: Edit ~/.bash_profile to remove the Miniconda directory from your PATH environment variable.

  5. Remove the following hidden file and folders that may have been created in the home directory:

    • .condarc file
    • .conda directory
    • .continuum directory

    By running:

    rm -rf ~/.condarc ~/.conda ~/.continuum