Cloning Conda root environment does not clone cond

2019-06-20 07:08发布

问题:

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

and it gave the following message:

The following packages cannot be cloned out of the root environment:
 - conda-4.2.9-py35_0
 - conda-build-2.0.2-py35_0

Will this be a problem?

回答1:

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.

For example, if I activate my Python 3.5 environment (on my Mac):

source activate py35

And look for conda:

(py35) macintosh-4:measuring mike$ which conda
/Users/mike/anaconda/envs/py35/bin/conda

It looks like it is a in the py35 environment.

But the file:

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)

contains this shebang to the root environment #!/Users/mike/anaconda/bin/python.

So, there is no problem with your cloning.