Anaconda import packages from another environment

情到浓时终转凉″ 提交于 2019-12-10 18:12:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!