johntruckenbrodt / spatialist

A Python module for spatial data handling
MIT License
30 stars 9 forks source link

Problem with mod_spatialite when using Win10 (...and a solution) #16

Closed maawoo closed 4 years ago

maawoo commented 4 years ago

Hi John! I encountered a problem with spatialist when I wanted to use the Archive-function from pyroSAR. RuntimeError: failed to load extension spatialite ...was the error message I got. From what I understand it's a common problem to get the spatialite extension to work under Windows but fortunately I found a solution that might solve this issue for people who are using Win10. It worked for me at least. The solution is described here in the sqlitebrowser wiki, which I assume is a source that is quite trustworthy 😉

Quick guide for other people who might read this:

  1. Go to C:\Users\USERNAME\.spatialist\mod_spatialite\ and delete the file libstdc++_64-6.dll
  2. Download one of the x86_64-win32-seh files from here or use this direct link
  3. Extract the zip-file somewhere and copy the files libstdc++-6.dll and libgcc_s_seh-1.dll from the bin folder into the directory mentioned in step 1
  4. Rename libstdc++-6.dll to libstdc++_64-6.dll
johntruckenbrodt commented 4 years ago

Hi Marco. thanks a lot for addressing this issue and finding a solution, much appreciated!
I had fixed this some while ago in commit e82d52a referencing the same sqlitebrowser page as you.
I must admit, a new version is overdue to incorporate these fixes otherwise they are very hard to find.
In case you want to try it out you can install the current master branch and check whether it is working:

python -m pip install git+https://github.com/johntruckenbrodt/spatialist

Kind regards, John

johntruckenbrodt commented 4 years ago

Hi Marco, I have just released a new version 0.5. It should work fine on Windows10. Cheers, John