lundi 9 novembre 2015

Using spatialite with 64 bit python's sqlite3 module on 64 bit Windows 7

I've installed the spatialite DLL files from this page. I've alternately tried putting the 32 bit DLLs (mod_spatialite-4.2.0-win-x86.7z) into Windows' system32 folder, and the 64 bit files (mod_spatialite-4.3.0a-win-amd64.7z) into the SysWOW64 folder. I then do the following in python:

import sqlite3
conn = sqlite3.connect(":memory:")
conn.enable_load_extension(True)
conn.execute('SELECT load_extension("[name of spatialite dll file]")')

This produces the error message:

sqlite3.OperationalError: %1 is not a valid Win32 application.

Any suggestions on how to get spatialite to work specifically on 64 bit Win7, with 64 bit python?

Aucun commentaire:

Enregistrer un commentaire