Skip to content

Installing Python locally

Espen Angell Kristiansen edited this page Nov 20, 2013 · 3 revisions

The guide assumes the install path is ${HOME}. This will create bin and lib directories in your users home directory.

Setting up environment variables

Put this in .bashrc

# Important that this new bin-directory is set first
export PATH=${HOME}/bin:$PATH  

Setting up Python 2.7.2

$ cd /tmp
$ wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
$ tar jxvf Python-2.7.2.tar.bz2
$ cd Python-2.7.2
$ ./configure --prefix=${HOME}
$ make
$ make install

Test it!

$ python --version
Python 2.7.2

Install PIP

If you want to install anything in your new python install, you will have to install pip: http://www.pip-installer.org/en/latest/installing.html.

Install virtualenv

As long as you have installed PIP, all you need is:

$ pip install virtualenv
Clone this wiki locally