sqlite3.NotSupportedError: deterministic=True requires SQLite 3.8.3 or higher

问题描述

sqlite3.NotSupportedError: deterministic=True requires SQLite 3.8.3 or higher
sqlite3.NotSupportedError: deterministic=True requires SQLite 3.8.3 or higher_第1张图片

解决方法

A kind of solution is changing the database from sqlite3 to pysqlite3. After acticate the virtualenv, install pysqlite.

pip3 install pysqlite3
pip3 install pysqlite3-binary

进入源代码文件

vim venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py 

修改以下内容

# from sqlite3 import dbapi2 as Database # annotation
from pysqlite3 import dbapi2 as Database # import pysqlite3

reference
https://stackoverflow.com/questions/66380006/django-deterministic-true-requires-sqlite-3-8-3-or-higher-upon-running-python

你可能感兴趣的:(sqlite,数据库)