Closed johnjohndoe closed 8 years ago
After you installed pysqlite
, can you successfully run this command in the python shell?
from pysqlite2 import dbapi2 as spatialite
hasattr(spatialite.Connection, 'enable_load_extension')
Do you have already some other python sqlite libarary on your system, which may interfere with your local install? Is your user folder in the path? Can the interpreter find the libraries?
You can see your path with:
import sys
for p in sys.path:
print(p)
Btw, are you using python 2?
True
.$PATH
contains $HOME
/home/user/.local/lib/python2.7/site-packages
which is where gpx2spatialite has been installed to.The issue here is, that for some reason the extension cannot be loaded even the sqlite3 library supports loading extensions. And in case we have pyspatialite
installed, it never gets loaded because our sqlite3 library supports loading extensions a we prioritize it in favor of pyspatialite
.
I installed gpx2spatialite v.0.8.0 on Ubuntu 15.10 via pip into user scope:
To import data I run the following command:
This fails with the following error message:
I followed your recommendation on how to satisfy dependencies by enabling loading extensions for pysqlite-2.6.3.tar.gz which I found described in .travis.yml as well. One difference from your setup is that I choose to install into user scope as in
python setup.py install --user
resp.pip install . --user
. After this I uninstalled and installed gpx2spatialite once again. However, the whole setup has no effect - the error stays.Can you please tell me where I can investigate further to solve this problem?