Skip to main content
Ctrl+K
conda 0.0.0.dev0+placeholder 文档 - Home conda 0.0.0.dev0+placeholder 文档 - Home
  • Conda
  • Conda-build
  • Miniconda
  • conda.org
  • GitHub
  • Element
  • Discourse
  • Conda
  • Conda-build
  • Miniconda
  • conda.org
  • GitHub
  • Element
  • Discourse

导航

  • 用户指南
    • conda 入门
    • 安装 conda
      • 在 Windows 上安装
      • 在 macOS 上安装
      • 在 Linux 上安装
      • Miniconda 的 RPM 和 Debian 存储库
    • 任务
      • 管理 conda
      • 管理环境
      • 管理渠道
      • 管理软件包
      • 管理 Python
      • 管理虚拟软件包
      • 创建自定义渠道
      • 创建项目
      • 查看命令行帮助
    • 配置
      • 使用 .condarc conda 配置文件
      • 设置
      • 管理多用户 conda 安装
      • 镜像渠道
      • 禁用 SSL 验证
      • 使用非标准证书
      • 使用环境和包缓存的自定义位置
      • 提高与 pip 的互操作性
      • 使用免费通道
    • 概念
      • 命令
      • 软件包
      • 软件包规范
      • 软件包搜索和安装规范
      • 频道
      • 环境
      • 使用 conda 安装
      • 性能
      • 面向数据科学家的 Conda
      • 插件
    • 故障排除
    • 备忘单
  • 配置
  • 命令
    • conda activate
    • conda clean
    • conda compare
    • conda config
    • conda create
    • conda deactivate
    • conda doctor
    • conda env
      • conda env config
        • conda env config vars
          • conda env config vars list
          • conda env config vars set
          • conda env config vars unset
      • conda env create
      • conda env export
      • conda env list
      • conda env remove
      • conda env update
    • conda info
    • conda init
    • conda install
    • conda list
    • conda notices
    • conda package
    • conda repoquery
      • conda repoquery depends
      • conda repoquery search
      • conda repoquery whoneeds
    • conda remove
    • conda rename
    • conda run
    • conda search
    • conda update
  • 发行说明
  • 术语
  • 开发者指南
    • 架构
    • Contributing to conda
    • 开发环境
    • 深入探索
      • conda install
      • conda init and conda activate
      • conda config and context
      • Solvers
      • Logging
    • 编写测试
      • 集成测试
      • 使用 Windows AppLocker 进行测试
    • 弃用
    • 发布
    • 插件
      • Auth Handlers
      • Health Checks
      • Request Headers
      • Post-commands
      • Pre-commands
      • Reporter Backends
      • Settings
      • Solvers
      • Subcommands
      • Virtual Packages
    • 规范
      • 技术规范:求解器状态
    • API
      • conda
        • __main__
        • _vendor
        • activate
        • api
        • auxlib
          • collection
          • compat
          • decorators
          • entity
          • exceptions
          • ish
          • logz
          • type_coercion
        • base
          • constants
          • context
        • cli
          • actions
          • common
          • conda_argparse
          • find_commands
          • helpers
          • install
          • main
          • main_clean
          • main_commands
          • main_compare
          • main_config
          • main_create
          • main_env
          • main_env_config
          • main_env_create
          • main_env_list
          • main_env_remove
          • main_env_update
          • main_env_vars
          • main_export
          • main_info
          • main_init
          • main_install
          • main_list
          • main_mock_activate
          • main_mock_deactivate
          • main_notices
          • main_package
          • main_pip
          • main_remove
          • main_rename
          • main_run
          • main_search
          • main_update
          • python_api
        • common
          • _logic
          • _os
            • linux
            • osx
            • unix
            • windows
          • compat
          • configuration
          • constants
          • disk
          • io
          • iterators
          • logic
          • path
            • _cygpath
            • directories
            • python
            • windows
          • pkg_formats
            • python
          • serialize
          • signals
          • toposort
          • url
        • core
          • envs_manager
          • index
          • initialize
          • link
          • package_cache_data
          • path_actions
          • portability
          • prefix_data
          • solve
          • subdir_data
        • deprecations
        • env
          • env
          • installers
            • base
            • conda
            • pip
          • pip_util
          • specs
            • binstar
            • requirements
            • yaml_file
        • exception_handler
        • exceptions
        • exports
        • gateways
          • anaconda_client
          • connection
            • adapters
              • ftp
              • http
              • localfs
              • s3
            • download
            • session
          • disk
            • create
            • delete
            • link
            • lock
            • permissions
            • read
            • test
            • update
          • logging
          • repodata
            • jlap
              • core
              • fetch
              • interface
            • lock
          • subprocess
        • history
        • instructions
        • misc
        • models
          • channel
          • dist
          • enums
          • leased_path_entry
          • match_spec
          • package_info
          • prefix_graph
          • records
          • version
        • notices
          • cache
          • core
          • fetch
          • types
          • views
        • plan
        • plugins
          • hookspec
          • manager
          • post_solves
            • signature_verification
          • reporter_backends
            • console
            • json
          • solvers
          • subcommands
            • doctor
              • health_checks
          • types
          • virtual_packages
            • archspec
            • conda
            • cuda
            • freebsd
            • linux
            • osx
            • windows
        • reporters
        • resolve
        • testing
          • cases
          • fixtures
          • gateways
            • fixtures
          • helpers
          • integration
          • notices
            • fixtures
            • helpers
          • solver_helpers
        • trust
          • constants
          • signature_verification
        • utils
      • conda_env
        • cli
        • installers
  • 开发者指南
  • core

link#

Package installation implemented as a series of link/unlink transactions.

Classes#

PrefixSetup

ActionGroup

PrefixActionGroup

ChangeReport

UnlinkLinkTransaction

Functions#

determine_link_type(extracted_package_dir, target_prefix)

make_unlink_actions(transaction_context, ...)

match_specs_to_dists(packages_info_to_link, specs)

run_script(→ bool)

Call the post-link (or pre-unlink) script, returning True on success,

messages(prefix)

determine_link_type(extracted_package_dir, target_prefix)#
make_unlink_actions(transaction_context, target_prefix, prefix_record)#
match_specs_to_dists(packages_info_to_link, specs)#
class PrefixSetup#

Bases: NamedTuple

target_prefix: str#
unlink_precs: tuple[conda.models.records.PackageRecord, Ellipsis]#
link_precs: tuple[conda.models.records.PackageRecord, Ellipsis]#
remove_specs: tuple[conda.resolve.MatchSpec, Ellipsis]#
update_specs: tuple[conda.resolve.MatchSpec, Ellipsis]#
neutered_specs: tuple[conda.resolve.MatchSpec, Ellipsis]#
class ActionGroup#

Bases: NamedTuple

type: str#
pkg_data: conda.models.package_info.PackageInfo | None#
actions: collections.abc.Iterable[conda.core.path_actions._Action]#
target_prefix: str#
class PrefixActionGroup#

Bases: NamedTuple

remove_menu_action_groups: collections.abc.Iterable[ActionGroup]#
unlink_action_groups: collections.abc.Iterable[ActionGroup]#
unregister_action_groups: collections.abc.Iterable[ActionGroup]#
link_action_groups: collections.abc.Iterable[ActionGroup]#
register_action_groups: collections.abc.Iterable[ActionGroup]#
compile_action_groups: collections.abc.Iterable[ActionGroup]#
make_menu_action_groups: collections.abc.Iterable[ActionGroup]#
entry_point_action_groups: collections.abc.Iterable[ActionGroup]#
prefix_record_groups: collections.abc.Iterable[ActionGroup]#
class ChangeReport#

Bases: NamedTuple

prefix: str#
specs_to_remove: collections.abc.Iterable[conda.resolve.MatchSpec]#
specs_to_add: collections.abc.Iterable[conda.resolve.MatchSpec]#
removed_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
new_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
updated_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
downgraded_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
superseded_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
fetch_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
revised_precs: collections.abc.Iterable[conda.models.records.PackageRecord]#
class UnlinkLinkTransaction(*setups)#
property nothing_to_do#
download_and_extract()#
prepare()#
verify()#
_verify_pre_link_message(all_link_groups)#
execute()#
_get_pfe()#
classmethod _prepare(transaction_context, target_prefix, unlink_precs, link_precs, remove_specs, update_specs, neutered_specs)#
static _verify_individual_level(prefix_action_group)#
static _verify_prefix_level(target_prefix_AND_prefix_action_group_tuple)#
static _verify_transaction_level(prefix_setups)#
_verify(prefix_setups, prefix_action_groups)#
_execute(all_action_groups)#
static _execute_actions(axngroup)#
static _execute_post_link_actions(axngroup)#
static _reverse_actions(axngroup, reverse_from_idx=-1)#
static _get_python_info(target_prefix, prefix_recs_to_unlink, packages_info_to_link) → tuple[str | None, str | None]#

Return the python version and location of the site-packages directory at the end of the transaction

static _make_link_actions(transaction_context, package_info, target_prefix, requested_link_type, requested_spec)#
static _make_entry_point_actions(transaction_context, package_info, target_prefix, requested_link_type, requested_spec, link_action_groups)#
static _make_compile_actions(transaction_context, package_info, target_prefix, requested_link_type, requested_spec, link_action_groups)#
_make_legacy_action_groups()#
print_transaction_summary()#
_change_report_str(change_report)#
static _calculate_change_report(prefix, unlink_precs, link_precs, download_urls, specs_to_remove, specs_to_add)#
run_script(prefix: str, prec, action: str = 'post-link', env_prefix: str = None, activate: bool = False) → bool#

Call the post-link (or pre-unlink) script, returning True on success, False on failure.

messages(prefix)#
On this page
  • Classes
  • Functions
    • determine_link_type()
    • make_unlink_actions()
    • match_specs_to_dists()
    • PrefixSetup
      • PrefixSetup.target_prefix
      • PrefixSetup.unlink_precs
      • PrefixSetup.link_precs
      • PrefixSetup.remove_specs
      • PrefixSetup.update_specs
      • PrefixSetup.neutered_specs
    • ActionGroup
      • ActionGroup.type
      • ActionGroup.pkg_data
      • ActionGroup.actions
      • ActionGroup.target_prefix
    • PrefixActionGroup
      • PrefixActionGroup.remove_menu_action_groups
      • PrefixActionGroup.unlink_action_groups
      • PrefixActionGroup.unregister_action_groups
      • PrefixActionGroup.link_action_groups
      • PrefixActionGroup.register_action_groups
      • PrefixActionGroup.compile_action_groups
      • PrefixActionGroup.make_menu_action_groups
      • PrefixActionGroup.entry_point_action_groups
      • PrefixActionGroup.prefix_record_groups
    • ChangeReport
      • ChangeReport.prefix
      • ChangeReport.specs_to_remove
      • ChangeReport.specs_to_add
      • ChangeReport.removed_precs
      • ChangeReport.new_precs
      • ChangeReport.updated_precs
      • ChangeReport.downgraded_precs
      • ChangeReport.superseded_precs
      • ChangeReport.fetch_precs
      • ChangeReport.revised_precs
    • UnlinkLinkTransaction
      • UnlinkLinkTransaction.nothing_to_do
      • UnlinkLinkTransaction.download_and_extract()
      • UnlinkLinkTransaction.prepare()
      • UnlinkLinkTransaction.verify()
      • UnlinkLinkTransaction._verify_pre_link_message()
      • UnlinkLinkTransaction.execute()
      • UnlinkLinkTransaction._get_pfe()
      • UnlinkLinkTransaction._prepare()
      • UnlinkLinkTransaction._verify_individual_level()
      • UnlinkLinkTransaction._verify_prefix_level()
      • UnlinkLinkTransaction._verify_transaction_level()
      • UnlinkLinkTransaction._verify()
      • UnlinkLinkTransaction._execute()
      • UnlinkLinkTransaction._execute_actions()
      • UnlinkLinkTransaction._execute_post_link_actions()
      • UnlinkLinkTransaction._reverse_actions()
      • UnlinkLinkTransaction._get_python_info()
      • UnlinkLinkTransaction._make_link_actions()
      • UnlinkLinkTransaction._make_entry_point_actions()
      • UnlinkLinkTransaction._make_compile_actions()
      • UnlinkLinkTransaction._make_legacy_action_groups()
      • UnlinkLinkTransaction.print_transaction_summary()
      • UnlinkLinkTransaction._change_report_str()
      • UnlinkLinkTransaction._calculate_change_report()
    • run_script()
    • messages()
Edit on GitHub
显示源代码

© Copyright 2017, Anaconda, Inc.

由 Sphinx 7.4.7创建。

Analytics Dashboard

Built with the PyData Sphinx Theme 0.15.4.