Do everything listed in this section to get your site up and running locally. If you run into problems, see the Troubleshooting section.


Mac OS X 10.6

Download and install setuptools from Setuptools gives you easy_install. Then run the following commands:

easy_install pip
pip install virtualenv
brew install libmemcached

Ubuntu (10+ / Lucid or Higher)

Install the following:

sudo apt-get install python-setuptools python-dev libpq-dev
sudo easy_install pip
sudo pip install virtualenv

Windows 7

Download and install Python 2.6 or 2.7 using the Windows 32-bit installer from Even if you’re on a 64-bit system, 32-bit is recommended (Michael Foord told me this).

Download and install setuptools from Setuptools gives you easy_install.

Install MinGW from Add the bin/ directory of your MinGW installation to your PATH environment variable (under Control Panel > System > Advanced system settings > Environment variables).

Create or open C:\Python26\Lib\distutils\distutils.cfg (Note: this may be inside the Python27 directory if you’re using Python 2.7). Add the following lines to the bottom of the file:


Open up a command prompt. Install pip and virtualenv:

easy_install pip
pip install virtualenv

Other operating systems (including various Linux flavors)

We don’t provide instructions for these, but you should be able to figure things out from the provided instructions. See FAQ.

Main instructions

These instructions install Django Packages on your computer, using PostgreSQL and sample data.

Git clone the project and install requirements

Create a virtualenv, activate it, git clone the Django Packages project, and install its requirements:

cd <installation-directory>
virtualenv env-oc
source env-oc/bin/activate
git clone opencomparison
cd opencomparison
pip install -r requirements.txt

Set up server specific settings

Don’t change settings/ Instead extend it as you see in settings/ In the new file make the following specifications:

Add a Google Analytics code if you have one:


Setup your email settings:

EMAIL_SUBJECT_PREFIX = '[Your Site Name] '

Set up your PostgreSQL database

Set up PostgreSQL and create a database:

createdb oc

For more info, see PostgreSQL setup instructions for new contributors.

Set up the database tables:

python syncdb --no-input
python migrate


This is optional. You can load some base data for development usage (i.e. not in production):

python load_dev_data

Grids will not be listed on the homepage, but they are available on /grids/

Load the site in your browser

Run the development server:

python runserver

Then point your browser to

Give yourself an admin account on the site

Create a Django superuser for yourself, replacing joe with your username/email:

python createsuperuser --username=joe

And then login into the admin interface (/admin/) and create a profile for your user filling all the fields with any data.