How to install packages from yaml file in Conda
If your conda env is already activated, use:
conda env update --file environment.yml
Or update a specific environment without activating it:
conda env update --name envname --file environment.yml
You want the conda-env
command instead, specifically
conda env update -n my_env --file ENV.yaml
Read the conda env update --help
for details.
If you wish to install this in the base env, then you would use
conda env update -n base --file ENV.yaml
Note that the base env isn't technically "global", but rather just the default env as well as where the conda
Python package lives. All envs are isolated unless you are either using the --stack
flag during activation to override the isolation or have - contra recommended practice - manually manipulated PATH
to include an env.