Installing Python 2.7.5 on Ubuntu 12.04 using PyEnv

PyEnv: https://github.com/yyuu/pyenv#choosing-the-python-version

Installation steps:

cd ~
git clone git://github.com/yyuu/pyenv.git .pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv" >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH" >> ~/.bashrc
$ echo 'eval "$(pyenv init -)" >> ~/.bashrc
sudo apt-get install libreadline-dev [installed using ubuntu software center]
sudo apt-get install libbz2-dev

pyenv install 2.7.5

pyenv rehash

Set python version for all terminals:


$pyenv global 2.7.5

$python --version
2.7.5

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s