SQlite problem while using builder:full

Hi, while deploying a python app, I’m getting this error:

ModuleNotFoundError: No module named '_sqlite3'

I’m already using in the fly.toml:

[build]
  builder = "paketobuildpacks/builder:full"
1 Like

Same issue.

This is not an answer to the issue, but the way I made it work was ditching the whole builpacks system and building it as a docker image with python default.

Thanks for the update.

I tried something like that and, even though the Dockerfile worked to run the app locally, when I tried to fly deploy it just hung, for almost an hour, with no other feedback.

I’m seeing the same - I’m trying to update an app that I haven’t touched for months and now just made trivial changes to the html/js files and still I’m getting this error.

On further investigation, it looks like paketobuildpacks/builder:full is pulling a python version compiled without sqlite and other optional builtin packages. I just ditched the whole thing and went full docker.

1 Like

@nyan can you share a dockerfile that worked for you as a replacement?

Sure, it was this:

FROM python:3.10
RUN mkdir /app
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt

Note there’s no EXEC at the end because I declared the running proccess in the fly.toml like this:

[processes]
app = “python main.py”

Hope it helps. I’m still not marking this as a solution because frankly it’s not, it’s just a workaround.

Is there an update on this? I feel it should be part of the base image?
Also would appreciate any tweaks fro Flask apps. Do we need to update the command?

This situation is a shame, it seems that the fly.io team really doesn’t care about Python users.

BTW use Heroku buildpack instead of the Paketo one, editing your fly.toml file after generation.

[build]
  builder = "heroku/buildpacks:latest"
1 Like

Thanks - ended up making it work with Dockerfile but yeah this has been a rough experience

Docker is de facto the new standard and so the way to go, but yes “rough experience” !

1 Like