Project handoffs and troubleshooting often start by confirming which Conda environments exist and which one the current terminal is using. The environment list shows each registered prefix, which separates the shared base install from named project environments and path-based environments before activation, export, removal, or repair work begins.

conda env list is the environment-focused command, and current Conda treats it as an alias for conda info –envs. Both commands print the same table of known environments and mark the active environment with an asterisk when the current shell has one selected.

The name column is blank for prefix environments created at a path rather than under Conda's named environment directory. Use the path shown in the right column with --prefix or conda activate /path/to/env when that blank row is the environment you need.

Steps to list Anaconda environments:

  1. Open a terminal where Conda is available.
  2. List the registered Conda environments.
    $ conda env list
    
    # conda environments:
    #
    # * -> active
    # + -> frozen
    base                     /opt/conda
    analytics            *   /opt/conda/envs/analytics
                             /tmp/project-env

    The asterisk marks the active environment. A blank name with a path, such as /tmp/project-env, is a prefix environment rather than a named environment.

  3. Run the equivalent conda info environment view when a runbook already uses conda info.
    $ conda info --envs
    
    # conda environments:
    #
    # * -> active
    # + -> frozen
    base                     /opt/conda
    analytics            *   /opt/conda/envs/analytics
                             /tmp/project-env

    conda env list and conda info –envs should show the same environment table. If the target environment is missing, create it first or verify that its prefix is registered.
    Related: How to create a Conda environment

  4. Use the listed name or path for the next environment command.
    $ conda activate analytics
    (analytics) $

    Use the name, such as analytics, for named environments. Use the full path with conda activate or --prefix for path-based environments.
    Related: How to activate a Conda environment

  5. Print environment paths as JSON when another tool needs machine-readable output.
    $ conda env list --json
    {
      "envs": [
        "/opt/conda",
        "/opt/conda/envs/analytics",
        "/tmp/project-env"
      ],
      "envs_details": {
    ##### snipped #####
        "/opt/conda/envs/analytics": {
          "name": "analytics",
          "active": true,
          "base": false,
          "frozen": false,
          "writable": true
        }
    ##### snipped #####
      }
    }

    The envs array provides the environment paths for scripts. Current Conda may also include envs_details metadata such as active, base, frozen, and writable.