Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda import packages from another environment

I imported an anaconda environment from another machine. I want to install the packages from imported environment into root or make the imported environment as default. Is there any way to either 1. import all the packages from one environment to another? OR 2. Use non-root environment as default environment?

Note: both environments are for python 2.7.

like image 575
PyRaider Avatar asked Feb 07 '17 20:02

PyRaider


1 Answers

First export the environment from one machine:

$ conda env export -n myenv -f myenv.yml

Then create a new environment from myenv.yml on the other machine:

$ conda env create -f myenv.yml

To use this environment as default, add source activate myenv to your .bashrc.

like image 102
harryscholes Avatar answered Sep 21 '22 05:09

harryscholes