Custom Python install / Django set up instructions

software development

#1

There’s a lot of outdated information on how to set up a custom Python installation for Dreamhost (either on wiki or elsewhere).

After a lot of trial and error, I managed to install Python 2.7.3, virtualenv, pip, and Django 1.4 properly on a Dreamhost shared account.

I’ve posted the instructions on this blog post. In addition to the manual installation instructions, I’ve also written a script to streamline the whole process.

Hopefully this will be of some use to others. (I also have a Ruby on Rails setup blog post as well.)


#2

Thanx for the post in your blog, your recommendation was usefull for me.
python now is really 2.7.3, but there is some problem.
When i restarted my ssh connection, all this configuration resetting to default python 2.5 and django 1.2
What have i do to avoid this?


#3

I’ve moved to a different blog setup so some of post has moved to a new location.

Did you use the pythonbrew or source install?


#4

It was PB.
I’ve added manually to .bash_profile or to .bashrc this strings (from your instructions):

# Load pythonbrew
alias pb='pythonbrew'
export PYTHONPATH=~/.pythonbrew/pythons/Python-2.7.3/lib
[[ -s /home/USR_NAME/.pythonbrew/etc/bashrc ]] && source /home/USR_NAME/.pythonbrew/etc/bashrc

So nowadays it works.
Very thank you for this automated script!