Why does it take ages to install Pandas on Alpine Linux

前端 未结 8 1403
孤独总比滥情好
孤独总比滥情好 2020-11-29 18:19

I\'ve noticed that installing Pandas and Numpy (it\'s dependency) in a Docker container using the base OS Alpine vs. CentOS or Debian takes much longer. I created a little t

8条回答
  •  甜味超标
    2020-11-29 19:15

    pandas is considered a community supported package, so the answers pointing to edge/testing are not going to work as Alpine does not officially support pandas as a core package (it still works, it's just not supported by the core Alpine developers).

    Try this Dockerfile:

    FROM python:3.8-alpine
    RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
    && apk add py3-pandas@community
    

    This works for the vanilla Alpine image too, using FROM alpine:3.12.

提交回复
热议问题