In reality you don’t need to use two versions of anaconda (and not this related to bashrc, bashrc just indicates the location of the installation), install only one version and you can have as many environments as you need, for example, download one of these versions and install. Note that the difference is that one comes with python 2.7 and the other with python 3.6 as default (root). I always install the 3.6.
If you installed the one that comes with pyathon 3.6 and run the command to see the (python) version, you get:
python --version
Python 3.6.0 :: Anaconda 4.3.1 (64-bit)
Let’s say you downloaded 3.6 and need to install python 2.7 for a specific project, then do:
conda create -n py27 python=2.7
With this we create an env called py27. To activate it do:
$ source activate py27
(py27) sidon@sidon....
Note that after activating the new environment your command prompt has changed, adding the name of the parentheses in the beginning "(py27)".
See now (after active environment) what the command to show the version gets:
python --version
Python 2.7.13 :: Continuum Analytics, Inc.
Once active, qq thing q vc install (with Pip for example), will be installed in that environment.
Let’s assume that a project appears where it is mandatory to work with python 3.4, so just do:
conda create -n py34 python=3.4
And so you have a new env. To list all your envs, do:
$ conda-env list
# conda environments:
#
autopart /home/sidon/anaconda3/envs/autopart
eztables /home/sidon/anaconda3/envs/eztables
gestauto /home/sidon/anaconda3/envs/gestauto
llabs /home/sidon/anaconda3/envs/llabs
material /home/sidon/anaconda3/envs/material
olist /home/sidon/anaconda3/envs/olist
py27 * /home/sidon/anaconda3/envs/py27
scrum /home/sidon/anaconda3/envs/scrum
root /home
Aztec indicates which env is active. To disable the current env and go back to root, do:
source deactivate