Installing in silent mode#

When installing in silent mode, you can supply additional arguments to the install command through your command line interface (CLI) or via script. Silent mode installation can be useful when deploying Anaconda Distribution or Miniconda to many clients, as the installation can be completed automatically without the user needing to manually select options in an installer wizard GUI or within the CLI itself.

Anaconda Distribution installers#

Miniconda installers#

Windows#

Download Miniconda or Anaconda Distribution manually from one of the links above or use curl -O to download via your CLI.

# Make sure you download the correct installer for your operating system's bit count
curl -O https://repo.anaconda.com/archive/Anaconda3-2022.05-Windows-x86_64.exe
curl -O https://repo.anaconda.com/miniconda/Miniconda-latest-Windows-x86_64.exe

Note

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

To run the Windows installer for Miniconda in silent mode, use the /S argument. The following optional arguments are supported:

  • /InstallationType=[JustMe|AllUsers]—Default is JustMe.

  • /AddToPath=[0|1]—Default is 0.

  • /RegisterPython=[0|1]—Make this the system’s default Python. Default is 0.

  • /S—Install in silent mode.

  • /D=<installation path>—Destination installation path. Must be the last argument. Do not wrap in quotation marks. Required if installing in silent mode.

All arguments are case-sensitive.

EXAMPLE: The following batch file command installs Miniconda for the current user without registering Python as the system’s default:

start /wait "" Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%UserProfile%\Miniconda3

Note

As of Anaconda Distribution 2022.05, the option to add Anaconda to the PATH environment variable during an All Users installation has been disabled. This was done to address a security exploit. You can still add Anaconda to the PATH environment variable during a Just Me installation.

Linux & macOS#

Download Miniconda or Anaconda Distribution manually from one of the links above or use curl -o to download via your CLI.

Note

The following instructions are for Miniconda. For Anaconda Distribution, substitute Anaconda for Miniconda in all of the commands and change https://repo.anaconda.com/miniconda to https://repo.anaconda.com/archive for downloading the installer.

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 the installation prefix/path already exists.

EXAMPLE:

#Downloading the latest Miniconda installer for macOS. Your architecture may vary.
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda.sh
#Downloading the latest Miniconda installer for Linux. Your architecture may vary.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda

The installer will not prompt you for anything, including setup of your shell to activate conda. To add this activation in your current shell session:

eval "$(/Users/jsmith/miniconda/bin/conda shell.YOUR_SHELL_NAME hook)"

For instance, if your shell is zsh, replace YOUR_SHELL_NAME with zsh.

With this activated shell, install conda’s shell functions for easier access in the future:

conda init

If you’d prefer that conda’s base environment not be activated on startup, set the auto_activate_base parameter to false:

conda config --set auto_activate_base false