Did you compile Python from source? If so, you need to use this option: 
./configure --enable-loadable-sqlite-extensions before running "make 
install".

On Wednesday, May 24, 2017 at 2:27:22 AM UTC-4, Antonis Christofides wrote:
>
> Hi,
>
> This is the error message I get when I run "./manage.py test" or 
> "./manage.py migrate":
>
>   File 
> "/home/anthony/nosync/virtualenvs/enhydris3.6/lib/python3.6/site-packages/django/contrib/gis/db/backends/spatialite/base.py",
>  
> line 53, in get_new_connection                           
>     'The pysqlite library does not support C extension loading. '
> django.core.exceptions.ImproperlyConfigured: The pysqlite library does not 
> support C extension loading. Both SQLite and pysqlite must be configured to 
> allow the loading of extensions to use SpatiaLite.
>
> However, something isn't right. AFAIU pysqlite isn't supported on Python 
> 3, therefore something else is happening. This is a Python 3.6 that I 
> installed on Debian stretch. These are the relevant settings:
>
> DATABASES = {
>     'default': {
>         'ENGINE': 'django.contrib.gis.db.backends.spatialite',
>         'NAME': 'enhydris.db',
>     }
> }
> if os.path.exists('/usr/lib/x86_64-linux-gnu/mod_spatialite.so'):
>     # This is necessary for spatialite>=4.2
>     SPATIALITE_LIBRARY_PATH = 'mod_spatialite'
>
> Thanks!
>
> A.
>
> -- 
> Antonis Christofideshttp://djangodeployment.com
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39b1f344-37e6-4030-9799-e8923942b36d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to