install
#
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#
Functions#
|
Validate that we are receiving at least one valid value for --name or --prefix. |
|
Ensure that the new prefix does not exist. |
|
|
|
|
|
|
|
|
|
Returns a dict of args required for fetching an index |
|
Executes a set of validations that are required before any installation |
|
Checks that each spec that is requested as an update exists in the prefix |
|
Executes an install of a new conda environment by cloning. |
|
Logic for conda install, conda update, conda remove, and conda create. |
|
Install a previous version of a conda environment |
|
|
|
Attributes#
- stderrlog#
- validate_prefix_exists(prefix: str | pathlib.Path) None #
Validate that we are receiving at least one valid value for --name or --prefix.
- validate_new_prefix(dest: str, force: bool = False) str #
Ensure that the new prefix does not exist.
- clone(src_arg, dst_prefix, json=False, quiet=False, index_args=None)#
- print_activate(env_name_or_prefix)#
- get_revision(arg, json=False)#
- 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
- class TryRepodata(notify_success, repodata, last_repodata, index_args, allowed_errors)#
- __enter__()#
- __exit__(exc_type, exc_value, traceback)#
- 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
- Parameters:
prefix -- The prefix where the environment will be created
command -- Type of operation being performed
- Raises:
error if the configuration for the install is bad
- ensure_update_specs_exist(prefix: str, specs: list[str])#
Checks that each spec that is requested as an update exists in the prefix
- Parameters:
prefix -- The target install prefix
specs -- List of specs to be updated
- Raises:
CondaError -- if there is an invalid spec provided
PackageNotInstalledError -- if the requested specs to install don't exist in the prefix
- install_clone(args, parser)#
Executes an install of a new conda environment by cloning.
- install(args, parser, command='install')#
Logic for conda install, conda update, conda remove, and conda create.
- install_revision(args, parser)#
Install a previous version of a conda environment
- revert_actions(prefix, revision=-1, index=None)#
- handle_txn(unlink_link_transaction, prefix, args, newenv, remove_op=False)#