I have tried everything to get this to build including installing wheel first and installing it within a venv, but the error is always the same.
I know that using the public.ecr.aws/lambda/python:3.12 image does not produce this error because Python 3.12 handles these installs differently according to What is the meaning of “Failed building wheel for X” in pip install? but I can’t use that image because its version of microdnf does not allow for installing remote and local packages which I need to install chrome and wkhtmltox later in the script.
Any expert advice here would be useful to me and hopefully others as well.
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.11
COPY ./ ${LAMBDA_TASK_ROOT}/
RUN yum update -y
RUN yum upgrade -y
# need to build some python libraries
RUN yum install -y gcc wget
RUN pip install libpff-python==20231205
[snip]