LinuxCommandLibrary

conda-info

Display Conda installation and environment information

TLDR

Show all information

$ conda info [[-a|--all]]
copy

Display base environment path
$ conda info --base
copy

List all conda environments
$ conda info [[-e|--envs]]
copy

List environment variables
$ conda info [[-s|--system]]
copy

Display list of channels with tokens exposed
$ conda info --unsafe-channels
copy

SYNOPSIS

conda info [options]

PARAMETERS

-h, --help
    Displays a help message for the command and exits.

--json
    Outputs all information in JSON format, which is ideal for scripting and programmatic parsing.

--yaml
    Outputs all information in YAML format, also highly useful for scripting and configuration management.

--base
    Shows only the prefix path of the base Conda environment, useful for locating the primary installation.

--envs
    Lists all known Conda environments on the system, along with their respective file paths.

--system
    Displays detailed system-level information, including operating system, CPU architecture, and memory details.

--unsafe-channels
    Reveals any channels configured in your Conda setup that are considered to be unsafe or insecure.

--offline
    Executes the command in offline mode, preventing any internet connection attempts for channel information.

--all
    A convenience option that displays all available information; equivalent to using both --envs and --system.

DESCRIPTION

conda info is a fundamental diagnostic command within the Conda ecosystem. It provides a comprehensive overview of your Conda setup, environment configurations, and system-specific details. This command is indispensable for debugging issues, verifying the health of your Conda installation, and understanding how your environments are structured.

When executed, it reports crucial details such as the Conda version, Python version used by Conda, the operating system and architecture, the location of the base environment, paths to package caches, and the configured channels for package retrieval.

It can also list all detected Conda environments, display system-wide information, and even output data in machine-readable formats like JSON or YAML, making it highly valuable for scripting and automation purposes. By using conda info, users can quickly grasp their Conda configuration, ensuring smooth package and environment management.

CAVEATS

The conda info command primarily serves as a reporting tool and does not modify any Conda configurations or environments.

The output can be extensive, especially when using the --all option, which combines environment and system information.

For scripting purposes, always prefer the --json or --yaml flags for structured and reliable output, as the human-readable format can change.

SCRIPTING WITH JSON/YAML

The --json and --yaml flags are incredibly powerful for integrating Conda information into scripts, automation pipelines, or monitoring tools, providing structured and easily parseable data.

This is crucial for tasks like programmatically checking active environments, verifying Conda versions, or confirming channel configurations without manual parsing of human-readable output.

DEBUGGING ENVIRONMENTS

conda info is often the first command to run when encountering issues with Conda environments or package installations. The output helps in identifying incorrect paths, misconfigured channels, or unexpected environment activations, guiding the user towards a solution.

HISTORY

The conda info command has been a foundational utility in the Conda package and environment manager since its early development by Continuum Analytics (now Anaconda, Inc.). It was designed from the outset to provide users with transparent access to their Conda setup's inner workings.

While its core function of reporting installation details remains consistent, conda info has evolved alongside Conda itself, incorporating new options like --json and --yaml for improved programmatic integration, reflecting the growing importance of automation in data science and software development workflows. Its persistent presence underscores its critical role in diagnosing and understanding Conda environments.

SEE ALSO

conda env list, conda config, conda list, conda create, conda activate

Copied to clipboard