Go教程

django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)

本文主要是介绍django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

背景

查看python版本:

查看Django版本:

问题描述

Django 项目中运行出现如下问题:

Django-django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)

问题解决

实际就是需要安装一个高版本 Sqlite

  1. 下载源码包
    也可以到官网上找合适的版本 https://www.sqlite.org/index.html

  2. 更新版本

cd /usr/local/src
wget https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz --no-check-certificate
tar -zxvf sqlite-autoconf-3380500.tar.gz
cd sqlite-autoconf-3380500.tar.gz
./configure --prefix=/usr/local/sqlite
make && make install

如果在下载资源中报错:
警告: 无法验证 www.sqlite.org 的由 “/C=US/O=Let's Encrypt/CN=R3” 颁发的证书:颁发的证书已经过期。
解决办法:

wget https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz --no-check-certificate
  1. 替换旧的版本:
mv /usr/bin/sqlite3 /usr/bin/sqlite3_bak
cd /usr/local/sqlite/bin/
ln -s sqlite3 /usr/bin/sqlite3
  1. 根据sql安装路径填写,并让配置生效:
[root@test ~] vim /etc/profile
#添加内容
export LD_LIBRARY_PATH="/usr/local/sqlite/lib"
[root@test ~]source /etc/profile

参考链接:
查看Django版本:https://blog.csdn.net/alwaysbefine/article/details/105956783
参考:https://mankel.blog.csdn.net/article/details/120273460?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~Rate-1-120273460-blog-123026417.pc_relevant_antiscanv3&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~CTRLIST~Rate-1-120273460-blog-123026417.pc_relevant_antiscanv3&utm_relevant_index=1

这篇关于django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!