Feeding Your Inner Developer

Installing Django 1.5.1 with python 2.7.4 on Bluehost

First SSH Into your account (using putty, or terminal if you are on linux) where we will start by moving to our home directory (~) and creating a directory for the latest python.

cd ~
mkdir python27
tar xzvf Python-2.7.4.tgz
cd Python-2.7.4
./configure -prefix=/homeX/your_username/python27 --enable-unicode=ucs4
make install

We then add this python directory to our PATH environment variable and load it

sed -i '$ aPATH=/homeX/your_username/python27/bin:$PATH' ~/.bashrc
cd ~
source .bashrc

This will direct all ‘python’ commands to the python installation we just set-up.

(It is recommended that most users ignore the following: If you are using the built-in python for any reason, to have both simultaneously simply rename python27/bin/python to python27/bin/python27 and from here on out replace every instance of ‘python’ with ‘python27’.)

Now you can pause and test by typing


you should receive output like the following

Python 2.7.4 (default, Apr 14 2013, 08:29:07)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

Now that we have python up and running lets start installing Django and its dependencies

  • Setuptools – prerequisite for pip
  • Pip – Python package manager
  • Flup – Python library for dealing with FastCGI


cd ~
tar xzvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python27 install


cd ~
tar xzvf pip-1.3.1.tar.gz
cd pip-1.3.1
python27 install


pip install flup

Now to Install Django 🙂

pip install Django

If you need to interface with any databases you can add them with the optional lines below

//for Mysql
pip install MySQL-python
//for Postgresql
pip install psycopg2

Congrats! Django is now setup on your server. You can confirm by typing


« »

© 2020 DEVGET.NET. Theme by Anders Norén.

%d bloggers like this: