Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloning Conda root environment does not clone conda and condo-build

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?

like image 683
user3731622 Avatar asked Jan 21 '17 20:01

user3731622


People also ask

Can you clone Conda environment?

Conda provides multiple ways of reproducing project environments. Creating a clone of an environment can provide a custom base environment or snapshot of the environment. Spec list and conda-pack create platform and operating system specific copies of an environment.

How do you specify a new environment location for Conda?

In summary, if you edit . condarc to include D:\envs , and then run conda env create -p D:\envs\myenv python=x.x , then activate myenv (or source activate myenv on Linux) should work. Hope that helps!

Is there anything wrong with cloning in conda?

This means that there is definitely sth wrong with cloning in Conda. Otherwise why should not it be allowed to keep the original configuration intact, clone it and do manipulations in the new environment?

Is it possible to clone root from another environment?

You should be able to clone root just fine. A conda environment doesn't have to be in the envs directory to be an environment. I think you are running out of memory because you are attempting to clone root which contains other envs. When the cloned root is created, it then attempts to clone the cloned root.

How do I create an anaconda environment?

Use the terminal or an Anaconda Prompt for the following steps: The first line of the yml file sets the new environment's name. For details see Creating an environment file manually. You can also use conda info --envs. You can control where a conda environment lives by providing a path to a target directory when creating the environment.

What does the conda activate base setting do?

This setting controls whether or not conda activates your base environment when it first starts up. You'll have the conda command available either way, but without activating the environment, none of the other programs in the environment will be available until the environment is activated with conda activate base.


1 Answers

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.

like image 127
Mike Müller Avatar answered Oct 20 '22 17:10

Mike Müller