conda#

Conda-flavored installer.

Functions#

_solve(→ conda.core.solve.Solver)

Solve the environment.

dry_run(→ conda.env.env.EnvironmentYaml)

Do a dry run of the environment solve.

install(→ dict | None)

Install packages into a conda environment.

_solve(prefix: str, specs: list[str], args: argparse.Namespace, env: conda.models.environment.Environment, *_, **kwargs) conda.core.solve.Solver#

Solve the environment.

Parameters:
  • prefix -- Installation target directory

  • specs -- Package specifications to install

  • args -- Command-line arguments

  • env -- Environment object

Returns:

Solver object

dry_run(specs: list[str], args: argparse.Namespace, env: conda.models.environment.Environment, *_, **kwargs) conda.env.env.EnvironmentYaml#

Do a dry run of the environment solve.

Parameters:
  • specs -- Package specifications to install

  • args -- Command-line arguments

  • env -- Environment object

Returns:

Solved environment object

Return type:

EnvironmentYaml

install(prefix: str, specs: list[str], args: argparse.Namespace, env: conda.models.environment.Environment, *_, **kwargs) dict | None#

Install packages into a conda environment.

This function handles two main paths: 1. For environments with explicit_specs (from @EXPLICIT files): Bypasses the solver

and directly installs packages using conda.misc.explicit() as required by CEP-23.

  1. For regular Environment instances: Uses the solver to determine the optimal package set before installation.

Parameters:
  • prefix -- The target installation path for the environment

  • specs -- Package specifications to install

  • args -- Command-line arguments from the conda command

  • env -- Environment object containing dependencies and channels

Returns:

Installation result information

Note

This implementation follows CEP-23, which states: "When an explicit input file is processed, the conda client SHOULD NOT invoke a solver."