Tuesday, February 7, 2017

Creating another environment on Anaconda (e.g., python 2)



Create another environment on Anaconda, e.g., if you installed default is python 3, and you want to use python 2:

- conda create -n python2 python=2.7 anaconda

which will create python 2.7 environment with the name "python2".


Activate and deactivate the environment (env):
- source activate python2
- source deactivate

You can install packages for python 2.* environment with the python2 env being activated


Use spyder with python 2.7

You can run the spyder app with python 2.7 by activating the python2 env, and type spyder in the command line.

source activate python2
- spyder


In case the spyder is not automatically installed during creating the env, you should install it first.

- conda install -n python2 spyder

Post a Comment