Installing Python 3 from Python 2 with Anaconda

Installing Python 3 with Anaconda
If you have already installed Anaconda 2.7 and finally decided to take a plunge into Python 3 and want to install Python 3. Congrats. You don’t have to start fresh. You can easily upgrade to Python 3 using Anaconda package manager by creating new environment for Python 3. Note that this virtual environment is completely separate and can have different Python version. We can use this command on terminal to install Python 3 in the new environment.

$ conda create -n py3k python=3 anaconda

It will install host of packages and once it is done, you are ready to work with Python 3. To use Python 3, on the terminal type

$ # To activate this environment, use:
$ source activate py3k

And you are ready to have fun with Python 3.

If you want to use your original Python 2.7, type

$ # To deactivate an active environment, use:
$ source deactivate