Where does django look for SQLite instance? (SQLite 3.8.3 or later is required (found 3.7.17))
I came across the same issue. I had installed sqlite 3.28.0, but I was getting the same error while migrating.
checking the output of the error I could see that the line 63 of the base.py file raised the exception due to the call of sqlite_version_info function.
you can see the specification at this link: DB-API 2.0 specification
sqlite3.sqlite_version_info
"The version number of the run-time SQLite library, as a tuple of integers."
The solution that I found after some testing was to set LD_LIBRARY_PATH with the path to the new sqlite:
export LD_LIBRARY_PATH="/usr/local/lib"
After set this variable, you can check the result with a little python script:
from sqlite3 import dbapi2 as Database
print(Database.sqlite_version_info)
and the result should be something like this: (3,28,0)
With this approach I could migrate and continue the django setup. I will update this post in case I will find other solutions. Hope this helps
Related videos on Youtube
SIMMORSAL
Updated on September 18, 2022Comments
-
SIMMORSAL over 1 year
I've cloned a django project to a vps and I'm trying to run it now, but I get this error when trying to
migrate
:$ python manage.py migrate django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).
When I checked the version for sqlite, it was 3.7.17, so I downloaded the newest version from sqlite website and replaced it with the old one, and now when I version it, it gives:
$ sqlite3 --version 3.27.2 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7
Still when I try to migrate the project, I get the exact same message as before which means the newer version is not found. I'm new to linux and would appreciate any help.
-
Brian Sanchez almost 4 yearsthis worked for me adding export LD_LIBRARY_PATH="/usr/local/lib" to .bashrc