This question is similar to this question. I have to support Python 2.7 and 3.
I have some code that is written in python 3. This works great on my python 3 install (anaconda for win7 + jupyer-notebook). I need to unit test my code under a python 2.7 environment.
Is there an easy way to setup a 2.7 environment on my anaconda setup without clobbering my working install? It would be really cool to be able to run python 2 under a 3 notebook using a magic command!



sixas suggested in the question you linked to so that your code runs in a single Py 2 or Py 3 environment. What are you actually trying to accomplish? Please give example.