See similar complaints about other times when people forgot to include sqlite support in Python compiled from source:
https://stackoverflow.com/questions/1210664/no-module-named-sqlite3
The solution is to install the libsqlite3-dev package first and then compile Python with sqlite support (with the --enable-loadable-sqlite-extensions flag).
Checklist
Concise Description:
sqlite
support is a quasi-standard part of Python which many packages relying on it, likepytest
,pytest-cov
, etc. For this reason Python is usually compiled with sqlite support. Unfortunately that is NOT the case for this images in this repo, see example: https://github.com/aws/deep-learning-containers/blob/master/tensorflow/inference/docker/2.3/py3/Dockerfile.cpu#L72See similar complaints about other times when people forgot to include sqlite support in Python compiled from source: https://stackoverflow.com/questions/1210664/no-module-named-sqlite3 The solution is to install the
libsqlite3-dev
package first and then compile Python with sqlite support (with the--enable-loadable-sqlite-extensions
flag).Also see the same in the official Python docker images: https://github.com/docker-library/python/blob/01b773accc5a2ccb7a4f0d83ec6eb195fe3be655/3.7/buster/Dockerfile#L43
DLC image/dockerfile: tensorflow-inference:2.3.1-cpu-py37-ubuntu18.04-v1.7
Current behavior:
ModuleNotFoundError: No module named '_sqlite3'
Expected behavior: Python should be compiled with sqlite support.
Additional context: