}

How to solve: ModuleNotFoundError: No module named '\_sqlite3' with python3

Created:

The error

ModuleNotFoundError: No module named '_sqlite3' 

That error means that you didn't have the SQLite development package installed when you built Python.

Solution

You need to recompile python with sqlite3 support, first install libsqlite3-dev and then recompile it with --enable-loadable-sqlite-extensions

sudo apt-get install libsqlite3-dev

If you are using pyenv, install --enable-loadable-sqlite-extensions and then rebuild the python interpreter.