Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating Anaconda root environment to new machine

I recently got a new OS X computer, coming from an earlier version of OS X, and would like to clone my root environment onto my new machine. I have exported my root environment on my old machine using

conda env export --name root -f root.yml

Now I would like to "clone" this root environment on my new machine, but can't use

conda env create --name root -f root.yml

because I get the error CondaValueError: Value error: prefix already exists: /Users/user/anaconda. This makes sense; it doesn't want to overwrite the root environment in /Users/user/anaconda, but is there a way to tell anaconda to download and install all the packages in root.yml into the root environment?

like image 741
chasely Avatar asked Oct 17 '22 22:10

chasely


1 Answers

This might work. I've used this to copy my conda root environment from my OS X computer to our linux servers on which conda was already installed. On your old OS X machine:

$conda list -e > root-spec.txt

Then edit root-spec.txt and remove the two lines which look like:

conda=4.1.12=py27_0
conda-env=2.5.2=py27_0

(since conda is already installed)

copy root-spec.txt to your new machine and try:

conda install --file root-spec.txt
like image 83
Eric Bridger Avatar answered Oct 21 '22 02:10

Eric Bridger