LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

conda-env

Manage conda environments

TLDR

List all environments
$ conda env list
copy
Export the current environment to a YAML file
$ conda env export > [environment.yml]
copy
Export only explicitly installed packages
$ conda env export --from-history > [environment.yml]
copy
Create an environment from a YAML file
$ conda env create -f [environment.yml]
copy
Create an environment with a specific name from a file
$ conda env create -n [env_name] -f [environment.yml]
copy
Remove an environment
$ conda env remove --name [env_name]
copy
Update an environment from a YAML file
$ conda env update -f [environment.yml]
copy

SYNOPSIS

conda env subcommand [options]

DESCRIPTION

conda env manages conda environments including creation from specification files, export, and removal. The environment.yml format allows reproducible environment definitions that can include conda packages, pip packages, and channel specifications.Use export --from-history to create cross-platform environment files that only list explicitly requested packages rather than all resolved dependencies.

PARAMETERS

list

List all conda environments.
create
Create an environment from a YAML specification file.
export
Export an environment definition to YAML.
remove
Remove an environment entirely.
update
Update an existing environment from a YAML file.
config
Configure environment-specific variables.
-n NAME, --name NAME
Name of the environment to operate on.
-f FILE, --file FILE
Path to the environment YAML file.
--from-history
(export) Only include packages explicitly installed by the user.
--no-builds
(export) Remove build specification from exported dependencies.

CAVEATS

The --from-history flag only works with structured formats (YAML, JSON), not with explicit or requirements formats. Environment files may not be portable across platforms unless --from-history or --no-builds is used during export.

SEE ALSO

Copied to clipboard
Kai