pyenv is all well and good but I feel that we should give a mention to the wonderful pipenv library from Kenneth Reitz.
https://github.com/pypa/pipenv
It provides the functionality of pyenv plus dependency locking, support for .env out-of-the-box and much more.