Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named '_sqlite3'

python3 manage.py runserver 0.0.0.0:8000 启动django项目时,报Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named ‘_sqlite3’ 错误。

解决方法:

Centos:

    yum install -y sqlite-devel

Ubuntu/Debian:

    apt-get install libsqlite3-dev

然后再重新编译安装python3:

./configure –prefix=/usr/local/python3.6

make && make install

    原文作者:zzfeng2012
    原文地址: https://www.jianshu.com/p/ce72cb458b23
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞