Installing scikit-image without dependency hell

Hi, I hope this is the right forum for this. I’m trying to install scikit-image in a Docker image and cannot seem to do so.

Here is the DockerFile I have so far:

FROM openjdk:8-jre-alpine
RUN apk add --no-cache tesseract-ocr python3 py3-numpy imagemagick && \
    pip3 install --upgrade pip setuptools wheel && \
    apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py-numpy-dev jpeg-dev && \
    pip3 install matplotlib && \
    pip3 install scikit-image && \
    apk del .build-deps

If I remove the line for scikit-image, it works fine. But I cannot add scikit-image without generating a whole bunch of errors. What dependencies am I missing?

Hey Peter,

can you share the error log with us? That makes it easier for us to help you :wink:


Yes, I realize that. :slight_smile: I wanted to make sure this was the right place first. But I think I might have figured it out. In addition to what I posted, I added gfortran musl-dev lapack lapack-dev and libstdc++. I’m still playing around to see if they are all required or if I can get rid of some of them.
Thanks for responding.


1 Like

Thanks for sharing the solution! :slightly_smiling_face: