Conda - Silently installing a package

One-time Use

-y, --yes option.

# e.g. No.1
conda create -n myenv python=3.6 -y

# e.g. No.2
# install into a specific environment
conda install -n myenv requests -y
# install into the "base" env
conda install flake8 --yes

Script Use

Warning. This method confirms any type of prompt.

export CONDA_ALWAYS_YES="true"

# confirm all following "conda" commands
conda create -n myenv
conda install -n myenv requests
# ...

# Disable yes to all
unset CONDA_ALWAYS_YES 

You may need to check How to activate conda env through shell script.


Environment Specific Use

Warning. This method confirms any type of prompt.

Enable "yes" to any prompt within current active env.

# enable yes to all in current env
conda config --env --set always_yes true

# disable it in current env
conda config --env --remove always_yes

Used $conda install -y pandas and it installed without any prompts (see documentation).


I suggest not to pass the confirmation process.

because it always has important info regarding this installation(which package will be updated and which dependency package will be installed and which package will be downgraded)

I once corrupt my environment due to not notice the update some of the package and took a long time to figure out some package need to stay in a older version to make some other package run properly.And that confirmation details will always makes you informed and tell you where to debug once you corrupt your package environment after installation

Anyway, here is the solution. Just use -y flag :

conda install -y PACKAGE_NAME