Conda - Silently installing a package Conda - Silently installing a package python python

Conda - Silently installing a package


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


One-time Use

-y, --yes option.

# e.g. No.1conda create -n myenv python=3.6 -y# e.g. No.2# install into a specific environmentconda install -n myenv requests -y# install into the "base" envconda install flake8 --yes

Script Use

Warning. This method confirms any type of prompt.

export CONDA_ALWAYS_YES="true"# confirm all following "conda" commandsconda create -n myenvconda install -n myenv requests# ...# Disable yes to allunset 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 envconda config --env --set always_yes true# disable it in current envconda config --env --remove always_yes


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