报错:ModuleNotFoundError: No module named ‘_sqlite3‘

报错:ModuleNotFoundError: No module named '_sqlite3’

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

sudo apt-get install sqlite-devel 
或
sudo apt-get install libsqlite3-dev

2.如果上面的方法不行,重新下载编译安装sqlite3

sudo wget https://www.sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
sudo tar zxvf sqlite-autoconf-3330000.tar.gz
cd sqlite-autoconf-3330000
sudo ./configure
sudo make && make install

3.进入python所在目录重新编译,重新编译安装python即可

sudo ./configure
sudo make && make install

 

你可能感兴趣的:(python,Django)