問題描述
我想創(chuàng)建一個(gè)與我的 root
環(huán)境完全相同的環(huán)境,但不制作任何包的硬拷貝(稍后我將添加一些不在 Anaconda 中的包).我認(rèn)為我可以使用以下方法之一來做到這一點(diǎn):
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 thought 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
但是所有這些下載包.如何創(chuàng)建當(dāng)前 Anaconda 發(fā)行版的精確副本環(huán)境?(我知道以后我可以使用 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
盡可能(幾乎總是)在內(nèi)部使用硬鏈接,因此新環(huán)境的成本最低,所以我的建議是使用:
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
,因?yàn)檫@會(huì)明確避免使用硬鏈接.
Do not use --copy
since that explicitly avoids using hardlinks.
這篇關(guān)于僅使用符號(hào)鏈接創(chuàng)建 conda 環(huán)境的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!