The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source

serg | Feb. 15, 2021, 10:36 a.m.

On Docker using python:3.8-alpine may encounter the subj error. To solve it add the text to Dockerfile: apk add jpeg-dev zlib-dev libjpeg && \