Skip to content Skip to sidebar Skip to footer

How To Use/install Rtree In Sqlite3 Module In Python 2.7 On Windows

I'm trying to use spatialite database with my django project that is using contrib.gis application (GeoDjango). When syncing database django gives an error 'no such module: rtree'.

Solution 1:

You need to build sqlite with the

SQLITE_ENABLE_RTREE

flag set. How you do that depends on your environment, but typically adding something like:

-DSQLITE_ENABLE_RTREE=1

to your compiler flags will usually be enough.

Solution 2:

looks like you need to install a spatial backend such as spatiallite see https://pypi.python.org/pypi/pyspatialite

Post a Comment for "How To Use/install Rtree In Sqlite3 Module In Python 2.7 On Windows"