After some more research it looks like a possible solution could have been pyenv with the usage described in the pyenv tutorial but it only recognizes a single system-wide python runtime (whichever is the default at the moment), and doesn't provide the option to switch between the system-wide python2 and python3.
Looks like pyenv can switch only between the system python and any of the versions explicitly installed via pyenv which can all be seen via pyenv install --list
and installed with e.g. pyenv install 3.5.2
. In other words, the python3 must be installed via pyenv in order to be able to switch between 2 and 3.
Pyenv can integrate with virtualenv which could be handy for dev testing since it includes all versions of anaconda, miniconda, pypy, jython, stackless, etc. It's probably the easiest way of installing multiple versions of python which do not come with your package manager, ie on older Linux distros that don't have a modern python in their repos.
But in the long run, all things considered, I found that the solution proposed by metatoaster is simpler and totally meets my requirements since I can use the python2 virtualenv to create both python2 and python3 environments without any overhead:
python -V
Python 2.7.12
mkdir -p ~/.virtualenvs && cd ~/.virtualenvs
virtualenv -p /usr/bin/python3 mypy3env
workon mypy3env
python -V
>>> Python 3.5.2