Yes, you can. Create two environments (tensorflow, tensorflow3) -- as @cel mentioned in the comments the environment names should be unique and it is only for your reference.
conda create -n tensorflow python=2.7
conda create -n tensorflow3 python=3.5
Now you have two environments with python2.7 and python3.5 (tensorflow is not installed yet!)
In order to do that move to each environment:
source activate <environment-name>
Then install Tensorflow in each environment based on the python that is to be used. (based on the anaconda version that you are using you can use pip/pip3 or conda-forge).
If you are installing with GPU then you need to download and install the CUDA libraries as well. Also, remember to set the environment variables in .bashrc
Once you are done, you can view the list of environments using the command:
conda info --envs
SOLUTION TO YOUR SPECIFIC ERROR:
The error that you got is probably because you already have an enviroment with the name "tensorflow". List the environments to see your existing Conda Enviroments using conda info --envs and then create the new python 2.7 environment using another name enviroment name like tensorflow27 using conda create -n tensorflow27 python=2.7
NOTE: When installing ANACONDA if you pre-appended the CONDA path to the PATH environment variable then change it to post-append (export PATH="$PATH:/home/dennis/anaconda3/bin")
so that the installation doesn't override the existing python installation. (you can check this using $which python
TESTED - I have both versions installed on my machine
REFERENCE: https://conda.io/docs/py2or3.html
-n tensorflownames the environment "tensorflow". Environment names have to be unique. Tryconda create -n tensorflow27 python=2.7 tensorflow- cel-c conda-forgeas well. - cel