Reputation: 123
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.
Upvotes: 5
Views: 7937
Reputation: 1079
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.
Upvotes: 6
Reputation: 132
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"
Upvotes: 1
Reputation: 123
I now find a usable solution: change the version of Django from 'Django==3.0.4' to 'Django==2.1.8' and it worked.
pip install django==2.1.8 -i https://mirrors.aliyun.com/pypi/simple/
Upvotes: -4
Reputation: 983
You have an outdated version of SQLite,you can try this:
python -m pip install -U sqlite
Upvotes: -2