common#

conda 命令行工具的常用实用程序。

函数#

confirm([message, choices, default, dry_run])

confirm_yn([message, default, dry_run])

is_active_prefix(→ bool)

确定我们传入的 args 是否指向活动前缀。

arg2spec(arg[, json, update])

specs_from_args(args[, json])

strip_comment(line)

spec_from_line(line)

specs_from_url(url[, json])

names_in_specs(names, specs)

disp_features(features)

stdout_json(d)

stdout_json_success([success])

print_envs_list(known_conda_prefixes[, output])

check_non_admin()

validate_prefix(prefix)

验证前缀是否为有效的 conda 环境。

属性#

confirm(message='Proceed', choices=('yes', 'no'), default='yes', dry_run=NULL)#
confirm_yn(message='Proceed', default='yes', dry_run=NULL)#
is_active_prefix(prefix: str) bool#

确定我们传入的 args 是否指向活动前缀。可以用作验证步骤,以确保不对活动前缀执行操作。

arg2spec(arg, json=False, update=False)#
specs_from_args(args, json=False)#
spec_pat#
strip_comment(line)#
spec_from_line(line)#
specs_from_url(url, json=False)#
names_in_specs(names, specs)#
disp_features(features)#
stdout_json(d)#
stdout_json_success(success=True, **kwargs)#
print_envs_list(known_conda_prefixes, output=True)#
check_non_admin()#
validate_prefix(prefix)#

验证前缀是否为有效的 conda 环境。

Raises:
返回:

有效前缀。

返回类型:

str