Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to run GeoDjango (Django 1.4) with Postgis 2.0.

Whenever I try to run syncdb I get the following error for geographic fields:

Failed to install index for stores.Store model: 
operator class "gist_geometry_ops" does not exist for access method "gist"

I have found various online discussions about this, but no clear answers.

It sounds as though I need to create some indexes by hand... or perhaps there is a patch that can help, but I don't know how to add it.

Please could someone explain simply how to fix this error?

share|improve this question
up vote 7 down vote accepted

GeoDjango 1.4 supports PostGIS 2.0 with too many workarounds to make it worth it.

Instead, install GeoDjango 1.5 beta which natively supports PostGIS 2.0 and switch to the official release next month.

share|improve this answer
Thank you! This advice saved me hours and hours! – Richard Dec 3 '12 at 12:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.