Using pyenv

I have been a virtualenv user for a while now. It’s a great way to manage separate python-related projects. What it does is create isolated python environments. It allows you to have different versions of the same package working in different locations. It lets you be independent of your sysadmin: since all the packages will exist in your home folder you don’t need to access the global packages folder. Most importantly, virtualenv ensures reproducibility of your results: you can extract from the environment, all packages being used and their corresponding versions. If you want to go the virtualenv route, then I recommend also installing virtualwenv-wrapper. This “add-on” makes it possible to manage all your existing virtual environments from anywhere on disk.

That being said, this is NOT a virtualenv tutorial.

Today I’m going to talk about something much more powerful than virtualenv. Meet pyenv: a Simple Python Version Management tool. Previously known as Pythonbrew, pyenv lets you change the global python version, install multiple python versions, set directory (project)-specific python versions, and yes create/manage virtualenvs. All this without depending on python itself and it works at the user-level — No need for any sudo commands. So let’s start, head over to the guide