pythonpython-3.xwindowspipspatialite

Loading spatialite with python3's module under Windows


I installed spatialite's Python module using pip:

pip install spatialite

I copied the mod_spatialite.dll found on https://www.gaia-gis.it/gaia-sins/index.html into my windows/system32 folder (I have Python 3 32bits)

I have the error message

spatialite.connection.LoadExtensionError: Failed to load SpatiaLite extension. Verify that your python module sqlite3 has load_extension support and check that libspatialite is installed. Tried extension names: mod_spatialite, mod_spatialite.so, mod_spatialite.dylib


Solution

  • Go to this https://www.gaia-gis.it/gaia-sins/ address download mod_spatialite, unzip it and copy in system32