libsqlite3.so unavailable in default Python buildpack

When using a Procfile from the default Python hellofly app, then adding in calls for sqlite3 to open a Sqlite DB from a mounted volume - the build fails due to missing ImportError: libsqlite3.so.0

in TOML:

[build]
  builder = "paketobuildpacks/builder:base"

Is there a better buildpack to use that does include libsqlite-dev installed?

2022-01-25T02:40:26.403 app[2ff79ef2] ord [info] Mounting /dev/vdc at /db w/ uid: 1000, gid: 1000 and chmod 0755

2022-01-25T02:40:26.406 app[2ff79ef2] ord [info] Preparing to run: `/cnb/process/web` as 1000

2022-01-25T02:40:26.419 app[2ff79ef2] ord [info] 2022/01/25 02:40:26 listening on [fdaa:0:4755:a7b:20db:0:80a1:2]:22 (DNS: [fdaa::3]:53)

2022-01-25T02:40:27.125 app[2ff79ef2] ord [info] [2022-01-25 02:40:27 +0000] [518] [INFO] Starting gunicorn 20.0.4

2022-01-25T02:40:27.125 app[2ff79ef2] ord [info] [2022-01-25 02:40:27 +0000] [518] [INFO] Listening at: http://0.0.0.0:8080 (518)

2022-01-25T02:40:27.125 app[2ff79ef2] ord [info] [2022-01-25 02:40:27 +0000] [518] [INFO] Using worker: sync

2022-01-25T02:40:27.127 app[2ff79ef2] ord [info] [2022-01-25 02:40:27 +0000] [532] [INFO] Booting worker with pid: 532

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] [2022-01-25 02:40:27 +0000] [532] [ERROR] Exception in worker process

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] Traceback (most recent call last):

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] worker.init_process()

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] self.load_wsgi()

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] self.wsgi = self.app.wsgi()

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] self.callable = self.load()

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] return self.load_wsgiapp()

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] return util.import_app(self.app_uri)

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_pip-install/packages/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] mod = importlib.import_module(module)

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_cpython/cpython/lib/python3.8/importlib/__init__.py", line 127, in import_module

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] return _bootstrap._gcd_import(name[level:], package, level)

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "<frozen importlib._bootstrap>", line 991, in _find_and_load

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "<frozen importlib._bootstrap>", line 671, in _load_unlocked

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "<frozen importlib._bootstrap_external>", line 843, in exec_module

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/workspace/hellofly.py", line 2, in <module>

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] import sqlite3

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_cpython/cpython/lib/python3.8/sqlite3/__init__.py", line 23, in <module>

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] from sqlite3.dbapi2 import *

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] File "/layers/paketo-buildpacks_cpython/cpython/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] from _sqlite3 import *

2022-01-25T02:40:27.510 app[2ff79ef2] ord [info] ImportError: libsqlite3.so.0: cannot open shared object file: No such file or directory

Try using paketobuildpacks/builder:full - it includes sqlite.

For anyone else curious, here’s the list of all the extra packages installed in the full builder image: