conda env export
#
Note
A newer conda export
command is now available with enhanced functionality, including
multiple export formats and a plugin-based architecture. See conda export
for the modern approach to environment export.
Export a given environment
usage: conda env export [-h] [-c CHANNEL] [--override-channels]
[-n ENVIRONMENT | -p PATH] [-f FILE]
[--format {environment-json,environment-yaml,explicit,json,reqs,requirements,txt,yaml,yml}]
[--no-builds] [--ignore-channels] [--json]
[--console CONSOLE] [-v] [-q] [--from-history]
Named Arguments#
- -c, --channel
Additional channel to include in the export
- --override-channels
Do not include .condarc channels
- -f, --file
File name or path for the exported environment. Note: This will silently overwrite any existing file of the same name in the current directory.
- --format
Possible choices: environment-json, environment-yaml, explicit, json, reqs, requirements, txt, yaml, yml
Format for the exported environment. If not specified, format will be determined by file extension or default to YAML.
- --no-builds
Remove build specification from dependencies
- --ignore-channels
Do not include channel names with package names.
- --from-history
Build environment spec from explicit specs in history
Target Environment Specification#
- -n, --name
Name of environment.
- -p, --prefix
Full path to environment location (i.e. prefix).
Output, Prompt, and Flow Control Options#
- --json
Report all output as json. Suitable for using conda programmatically.
- --console
Select the backend to use for normal output rendering.
- -v, --verbose
Can be used multiple times. Once for detailed output, twice for INFO logging, thrice for DEBUG logging, four times for TRACE logging.
- -q, --quiet
Do not display progress bar.
Examples:
conda export
conda export --file FILE_NAME
conda export --format yaml
conda export --file environment.yaml
Overview#
The conda env export
command exports conda environments to YAML format.
This command continues to be fully supported.
For new projects, consider conda export, which provides additional features:
Multiple export formats (YAML, JSON, explicit, requirements)
Automatic format detection based on filename
Plugin-based architecture for custom formats
Enhanced cross-platform compatibility options
Alternative: Enhanced Export Command#
If you're interested in additional export formats and functionality,
the conda export
command offers enhanced capabilities:
Traditional (conda env export):
conda env export > environment.yml
conda env export --from-history > environment.yml
Enhanced (conda export):
conda export --format=environment-yaml > environment.yaml
conda export --from-history --format=environment-yaml > environment.yaml
The enhanced command provides additional features:
# Auto-detect format from filename
conda export --file=environment.yaml
# Export to different formats
conda export --format=environment-json --file=environment.json
conda export --format=explicit --file=explicit.txt
See Also#
conda export - Enhanced environment export command with multiple formats
Managing environments - Environment management guide