I stumbled upon pyenv today. It lets you:

  • change the global python version per user
  • change the python version per project
  • override the python version with an environment variable

It doesn’t depend on python (unlike virtualenv).

There’s also a pyenv plugin to manage virtualenv.

It’s a fork of rbenv and works in the same way i.e. shims and shell functions.