I’m getting below error in Apache error logs:
django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)
I verified the sqlite3 version both in virtual environment and non virtual environment (standard). I can see the latest sqlite3 in both Python.
$ python3.7
Python 3.7.12 (default, Nov 8 2021, 09:02:58)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sqlite3 import dbapi2 as Database
>>> Database.sqlite_version_info
(3, 36, 0)
Error log from Apache web server:
[Mon Nov 08 15:02:33.698244 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] backend = load_backend(db['ENGINE'])
[Mon Nov 08 15:02:33.698249 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] File "/home/rafiq/myprojectenv/lib/python3.7/site-packages/django/db/utils.py", line 111, in load_backend
[Mon Nov 08 15:02:33.698252 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] return import_module('%s.base' % backend_name)
[Mon Nov 08 15:02:33.698257 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
[Mon Nov 08 15:02:33.698260 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] return _bootstrap._gcd_import(name[level:], package, level)
[Mon Nov 08 15:02:33.698265 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] File "/home/rafiq/myprojectenv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 73, in <module>
[Mon Nov 08 15:02:33.698267 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] check_sqlite_version()
[Mon Nov 08 15:02:33.698273 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] File "/home/rafiq/myprojectenv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 69, in check_sqlite_version
[Mon Nov 08 15:02:33.698276 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] 'SQLite 3.9.0 or later is required (found %s).' % Database.sqlite_version
[Mon Nov 08 15:02:33.698294 2021] [wsgi:error] [pid 1459] [remote 192.168.0.105:62615] django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
I see the latest version Python but why Apache reports 3.7.17?
2
Answers
I resolved the problem with the below steps.
The document which I followed doesn't contain the above-mentioned two commands and that helped to overcome the actual issue.
try this: