ubuntu postgres

Python 2.6, Python 2.7, an Ubuntu
kernel can be prepared in EC2 for
Django and Postgresql needs some major libraries not
often included in the core set of libraries. Gcc is the Gnu compiler.
Recent Python versions on instances are Python 2.6.4 and Python 2.7.2

Use apt-get to install postgres, gcc and these libraries

sudo apt-get update
sudo apt-get install postgresql
sudo apt-get install gcc
sudo apt-get install python-dev
sudo apt-get install libpq-dev
sudo apt-get install python-virtualenv
sudo apt-get install python-psycopg2

You probably want a virtual environment

source bin/activate


virtualenv nameofnewthing
source nameofnewthing/bin/activate

and pip install Django, gunicorn and dj_database_url

pip install Django
pip install gunicorn
pip install dj-database-url