manlix@lab:~$ sudo apt-get update
manlix@lab:~$ sudo apt-get install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git
manlix@lab:~$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Add these lines above all lines:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
Add this line to the end:
eval "$(pyenv init -)"
manlix@lab:~$ . ~/.bashrc
manlix@lab:~$ pyenv --version
pyenv 2.2.0