From charlesreid1

If you don't want to deal with the difficulties of installing a system version of Python, or you don't have the permissions to do so, you have another option: install a virtual version of Python, called virtualenv.

This can be obtained from here: http://pypi.python.org/pypi/virtualenv

Installing

How It Works

To install virtualenv, you will pick a prefix (an installation directory), and virtualenv will create its own bin/ and lib/ directories, along with its own python binary. This binary wraps the already-installed python binary, wherever it is on the system, but does so in a way that strips out any information about paths, libraries, packages, modules, etc.

It also wraps the system's versions of easy_install and pip, so you can also install modules and packages in the usual way.

This gives you a clean, sterile version of Python, and the tools needed to install any and all modules and libraries in a stand-alone version of Python. This keeps you from having to deal with issues with an existing system Python, and it also allows you to shuffle and change things around without ever changing (breaking) the system python.

Instructions

Download the virtualenv tarball and untar it to the source directory. Change to this directory and run:

$ python setup.py build
$ mkdir -p $HOME/pkg/virtualenv/lib/python2.7/site-packages/
$ export PYTHONPATH=$HOME/pkg/virtualenv/lib/python2.7/site-packages:$PYTHONPATH
$ python setup.py install --prefix=$HOME/pkg/virtualenv

or wherever you want to install it.