When I deploy my application (Python + Flask), I have a module import error:
2022-12-19T23:04:12.794 app[83761953] cdg [info] File "/workspace/app.py", line 18, in <module>
2022-12-19T23:04:12.794 app[83761953] cdg [info] from db import Database
2022-12-19T23:04:12.794 app[83761953] cdg [info] File "/workspace/db.py", line 2, in <module>
2022-12-19T23:04:12.794 app[83761953] cdg [info] import sqlite3
2022-12-19T23:04:12.794 app[83761953] cdg [info] File "/layers/paketo-buildpacks_cpython/cpython/lib/python3.10/sqlite3/__init__.py", line 57, in <module>
2022-12-19T23:04:12.794 app[83761953] cdg [info] from sqlite3.dbapi2 import *
2022-12-19T23:04:12.794 app[83761953] cdg [info] File "/layers/paketo-buildpacks_cpython/cpython/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>
2022-12-19T23:04:12.794 app[83761953] cdg [info] from _sqlite3 import *
2022-12-19T23:04:12.794 app[83761953] cdg [info] ModuleNotFoundError: No module named '_sqlite3'
I have tried to use the paketobuildpacks/builder:full
instead of paketobuildpacks/builder:base
as suggested here, but it doesn’t fix the problem.
Any idea?