:py:mod:`install` ================= .. py:module:: conda.cli.install .. autoapi-nested-parse:: Conda package installation logic. Core logic for `conda [create|install|update|remove]` commands. See conda.cli.main_create, conda.cli.main_install, conda.cli.main_update, and conda.cli.main_remove for the entry points into this module. Classes ------- .. autoapisummary:: conda.cli.install.TryRepodata conda.cli.install.Repodatas Functions --------- .. autoapisummary:: conda.cli.install.validate_prefix_exists conda.cli.install.validate_new_prefix conda.cli.install.check_prefix conda.cli.install.clone conda.cli.install.print_activate conda.cli.install.get_revision conda.cli.install.get_index_args conda.cli.install.validate_install_command conda.cli.install.ensure_update_specs_exist conda.cli.install.install_clone conda.cli.install.install conda.cli.install.install_revision conda.cli.install.revert_actions conda.cli.install.handle_txn Attributes ---------- .. autoapisummary:: conda.cli.install.stderrlog .. py:data:: stderrlog .. py:function:: validate_prefix_exists(prefix: str | pathlib.Path) -> None Validate that we are receiving at least one valid value for --name or --prefix. .. py:function:: validate_new_prefix(dest: str, force: bool = False) -> str Ensure that the new prefix does not exist. .. py:function:: check_prefix(prefix: str, json=False) .. py:function:: clone(src_arg, dst_prefix, json=False, quiet=False, index_args=None) .. py:function:: print_activate(env_name_or_prefix) .. py:function:: get_revision(arg, json=False) .. py:function:: get_index_args(args) -> dict[str, any] Returns a dict of args required for fetching an index :param args: The args provided by the cli :returns: dict of index args .. py:class:: TryRepodata(notify_success, repodata, last_repodata, index_args, allowed_errors) .. py:method:: __enter__() .. py:method:: __exit__(exc_type, exc_value, traceback) .. py:class:: Repodatas(repodata_fns, index_args, allows_errors=()) .. py:method:: __iter__() .. py:method:: succeed() .. py:function:: validate_install_command(prefix: str, command: str = 'install') Executes a set of validations that are required before any installation command is executed. This includes: * ensure the configuration is valid * ensuring the user in not an admin * ensure the user is not forcing 32bit installs in the root prefix :param prefix: The prefix where the environment will be created :param command: Type of operation being performed :raises: error if the configuration for the install is bad .. py:function:: ensure_update_specs_exist(prefix: str, specs: list[str]) Checks that each spec that is requested as an update exists in the prefix :param prefix: The target install prefix :param specs: List of specs to be updated :raises CondaError: if there is an invalid spec provided :raises PackageNotInstalledError: if the requested specs to install don't exist in the prefix .. py:function:: install_clone(args, parser) Executes an install of a new conda environment by cloning. .. py:function:: install(args, parser, command='install') Logic for `conda install`, `conda update`, `conda remove`, and `conda create`. .. py:function:: install_revision(args, parser) Install a previous version of a conda environment .. py:function:: revert_actions(prefix, revision=-1, index=None) .. py:function:: handle_txn(unlink_link_transaction, prefix, args, newenv, remove_op=False)