Ubuntu下启动django项目报错:ModuleNotFoundError: No module named ‘_sqlite3‘

1.首先安装缺失的sqlite3库:

sudo apt-get install libsqlite3-dev

2. 如果不行就重新编译一下sqlite:

sudo wget https://www.sqlite.org/2018/sqlite-autoconf-3250300.tar.gz

sudo tar zxvf sqlite-autoconf-3250300.tar.gz 

cd sqlite-autoconf-3250300

sudo ./configure

sudo make && make install

3. 进入python目录重新编译安装python:

sudo make && make install

4. 重启Django项目

你可能感兴趣的:(Web开发与部署,django,ubuntu,sqlite)