From Mac to PC - Different Anaconda environments

寵の児 提交于 2020-01-17 06:08:09

问题


I am a long time Mac/Linux user who has recently purchased a Windows laptop. I have two completely separate Anaconda installations on my Mac using PyEnv which allows me to isolate them effectively. Sure it wastes a bit of space on my Mac's hard disk, but I do not mind.

I am returning to a Windows machine after a long time, so I am not quite up to speed yet. Is there a way to effectively isolate two different versions of Anaconda on Windows? One for python 3 and other for python 2? I am frequently using different libraries and packages, e.g., pandas, etc. on both python 3 and 2 and also installing other packages either using 'conda install' or 'pip'. What is the optimal strategy for managing two Anaconda environments for Python 3 and 2 on the Windows machine? Once again, the disk capacity is not a problem since I have a one terabyte drive on my Windows machine.


回答1:


You can have one central installation of Anaconda and use the native environment feature. Let's say you install the 3.6 version of Anaconda onto your machine, you can create an environment with the full 2.7 version of Anaconda like this:

conda create --name py27 python=2.7 anaconda

And you can conda install whatever packages you desire into your environment.



来源:https://stackoverflow.com/questions/43463013/from-mac-to-pc-different-anaconda-environments

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