问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/42099369/anaconda-import-packages-from-another-environment