文档路径如下:
conda create — conda 24.7.2.dev67 documentation
usage: conda create [-h] [--clone ENV] [-n ENVIRONMENT | -p PATH] [-c CHANNEL]
[--use-local] [--override-channels]
[--repodata-fn REPODATA_FNS] [--experimental {jlap,lock}]
[--no-lock] [--repodata-use-zst | --no-repodata-use-zst]
[--strict-channel-priority] [--no-channel-priority]
[--no-deps | --only-deps] [--no-pin] [--copy]
[--no-shortcuts] [--shortcuts-only SHORTCUTS_ONLY] [-C]
[-k] [--offline] [--json] [-v] [-q] [-d] [-y]
[--download-only] [--show-channel-urls] [--file FILE]
[--no-default-packages] [--subdir SUBDIR]
[--solver {classic}] [-m] [--dev]
[package_spec ...]
向某一特定文件夹复制已有环境,使用的参数为:
--prefix
--clone
conda create --prefix D:/XXX/XXX/XXX --clone XXXXXXXXX
这样做生成的环境没有名字,当需要删除时,可以:
(1) 找到路径,直接把文件夹全部删除,即可。
(2) 查一下conda remove的文档:
usage: conda-script.py remove [-h] [-n ENVIRONMENT | -p PATH] [-c CHANNEL] [--use-local] [--override-channels]
[--repodata-fn REPODATA_FNS] [--all] [--features] [--force-remove] [--no-pin]
[--experimental-solver {classic,libmamba,libmamba-draft}] [-C] [-k] [--offline] [-d]
[--json] [-q] [-v] [-y] [--dev]
[package_name ...]
按照文档所述,用-p参数即可:
(base) C:\WINDOWS\system32>conda remove -p D:/XXX/XXX/XXX --all