ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version)

Viewed 6103

ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version) django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later

I met with this problem at the django project, mismatching version for the sqlite3 and the django. this occurs at the centos7 env, and I also want a convenient solution that works in the container env.

4 Answers

I solved this issue by upgrading my version of sqlite3 using this command:

cd ~ && wget https://www.sqlite.org/2020/sqlite-autoconf-3320100.tar.gz && tar xvfz sqlite-autoconf-3320100.tar.gz && cd sqlite-autoconf-3320100 && ./configure && make && make install

I am using ElasticBeanstalk for my setup, so I added a .config file to the .ebextensions folder and put this in it:

option_settings:
  aws:elasticbeanstalk:application:environment:
    LD_LIBRARY_PATH: "/usr/local/lib"
commands:
  01_upgrade_sqlite:
    command: "cd ~ && wget https://www.sqlite.org/2020/sqlite-autoconf-3320100.tar.gz && tar xvfz sqlite-autoconf-3320100.tar.gz && cd sqlite-autoconf-3320100 && ./configure && make && make install"

Many thanks to Bejür for adding the LD_LIBRARY_PATH environment variable here in order to get it to work.

In my case, upgrading sqlite with kloddant's instructions helped only partially. SQLite was installed, but python was still referring to the old sqlite version.

An additional step to fix this issue was setting the environment variable LD_LIBRARY_PATH="/usr/local/lib"

Add it to .ebextensions/*.config

option_settings:
  "aws:elasticbeanstalk:application:environment":
    LD_LIBRARY_PATH: "/usr/local/lib"

You have an outdated version of SQLite,you can try this:

python -m pip install -U sqlite
Related