No need to use virtualenv $ conda create -n py27 python=2.7 anaconda If so, {Anaconda3 path} / env / py27 will be created.
If you want to use python2.7, use the following command.
in windows $ activate py27
To return to python3, use the following command. $ deactivate
That's very easy. Anaconda is wonderful.
[Addition] On mac When using python2.7 (for anaconda3-2.5.0) $ source ~/.pyenv/versions/anaconda3-2.5.0/bin/activate py27 When reverting to python3 $ source ~/.pyenv/versions/anaconda3-2.5.0/bin/deactivate
Since the above is long, it is convenient to add the following to ~ / .bashrc etc. alias py2='source ~/.pyenv/versions/anaconda3-2.5.0/bin/activate py27' alias py3='source ~/.pyenv/versions/anaconda3-2.5.0/bin/deactivate'
Then $ py2 Or $ py3 You can switch the python version with.
Recommended Posts