克隆Conda根环境不会克隆conda和condo-build [英] Cloning Conda root environment does not clone conda and condo-build
问题描述
我正在OS X El Capitan 10.11.4上使用conda 4.2.9.
I'm using conda 4.2.9 on OS X El Capitan 10.11.4.
我使用以下命令克隆了根环境:
I cloned the root env with the command:
conda create -n rootclone --clone root
它给出了以下消息:
The following packages cannot be cloned out of the root environment:
- conda-4.2.9-py35_0
- conda-build-2.0.2-py35_0
这会是个问题吗?
推荐答案
Conda仅在根环境中有效.因此,无法克隆conda部分.即使您激活了其他环境,命令conda
也会是根目录下的命令.
Conda only works from the root environment. So cloning the conda part is not possible. Even when you have a different environment activated, the command conda
will be the one from root.
例如,如果我激活我的Python 3.5环境(在Mac上):
For example, if I activate my Python 3.5 environment (on my Mac):
source activate py35
并查找conda
:
(py35) macintosh-4:measuring mike$ which conda
/Users/mike/anaconda/envs/py35/bin/conda
它看起来像是在py35
环境中的一个.
It looks like it is a in the py35
environment.
但文件:
less /Users/mike/anaconda/envs/py35/bin/conda
#!/Users/mike/anaconda/bin/python
if __name__ == '__main__':
import sys
import conda.cli
sys.exit(conda.cli.main())
/Users/mike/anaconda/envs/py35/bin/conda (END)
将此shebang包含在根环境#!/Users/mike/anaconda/bin/python
中.
contains this shebang to the root environment #!/Users/mike/anaconda/bin/python
.
因此,克隆没有问题.
这篇关于克隆Conda根环境不会克隆conda和condo-build的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!