Django 创建app发生异常:exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)

执行命令python manage.py startapp myjango 时发生异常:

 原因: SQLite版本过低,需要升级

 解决:

下载源码包: wget https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz(上官网https://www.sqlite.org自己找一下)

Django 创建app发生异常:exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)_第1张图片

解压: tar -zxvf sqlite-autoconf-3350500.tar.gz

Django 创建app发生异常:exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)_第2张图片

进入到目录:cd sqlite-autoconf-3350500

初始化并编译安装:

./configure --prefix=/usr/local/

Django 创建app发生异常:exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)_第3张图片

make && make install

Django 创建app发生异常:exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)_第4张图片

重命名并软链:

mv  /usr/bin/sqlite3 /usr/bin/sqlite3.bak

ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3

配置环境变量并生效:

echo export LD_LIBRARY_PATH="/usr/local/lib">> ~/.bashrc

source ~/.bashrc

检查版本:sqlite3 --version

Django 创建app发生异常:exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17)_第5张图片

你可能感兴趣的:(Django,mysql,数据库,sql)