Dreamhost supplies a fairly old version of Python in their shared hosting environments. It recently became necessary for me to use a newer version, and since this involved a bit of juggling, and since I’m also likely to forget how I did it, I thought I’d detail the steps here. These instructions should work with any Dreamhost shared hosting user, but follow them at your own risk.
The end result of this process is being able to run a current version of Python from your shared hosting user’s shell. It requires compiling, installing and running Python from your home directory rather than the system bin
directories.
1. Create a helpful working directory
I chose to install all Python-related stuff in a python/
directory under my user’s home directory.
$ mkdir ~/python
$ cd ~/python