问题描述
我想创建一个环境,该环境与我的root
环境完全相同,但是不对软件包进行任何硬拷贝(以后,我将添加一些不在Anaconda中的软件包).我可以使用以下任一方法来做到这一点:
I want to create an environment which is an exact copy of my root
environment, but not making any hard copies of packages (later I will add a few packages not in Anaconda). I though I could do this with one of the following:
conda create -n newroot --clone root
conda create -n newroot --copy root
conda create -n newroot anaconda
但是所有这些下载软件包.如何创建当前Anaconda发行版的精确副本环境? (我知道以后我可以使用conda install -n newroot <package name>
添加软件包)
But all of these download packages. How do I create an exact replica environment of the current Anaconda distribution? (I know later I can add packages with conda install -n newroot <package name>
)
推荐答案
conda
在可能的情况下(几乎始终)在内部使用硬链接,因此新环境的成本最小,因此我的建议是使用:
conda
uses hardlinks internally when it can (nearly always) so the cost of new environments is minimal, so my recommendation is to use:
conda create -n newroot --clone root
请勿使用--copy
,因为这明确避免使用硬链接.
Do not use --copy
since that explicitly avoids using hardlinks.
这篇关于仅使用符号链接创建conda环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!