[Django]-Pillow is not found by Django thouhg it is installed using docker

1👍

Please try to use "pillow" starting from lowercase p.

1👍

Add this two lines under the FINAL section, just below the RUN apk update && apk add libpq

# install pillow dependencies
RUN apk add --no-cache jpeg-dev zlib-dev
RUN apk add --no-cache --virtual .build-deps build-base linux-headers

This is happening because the BUILDER removes the dependencies required for Pillow after creating the image. In the FINAL image, Pillow is available, but its required dependencies are not.

0👍

I was stuck with the same problem.
Adding these dependencies to the FINAL section resolved this issue

# install pillow dependencies
RUN apk add --no-cache jpeg-dev zlib-dev \
    fribidi-dev \
    harfbuzz-dev \
    lcms2-dev \
    openjpeg-dev \
    tcl-dev \
    tiff-dev \
    tk-dev 

Leave a comment