Fargate aws-cli:latest installing Python Pandas

0

Hi! I am installing Python Pandas into a Fargate instance (aws-cli:latest) defined by the Dockerfile below. The goal is to use this instance as a ETL job. Essentially from python Pandas mostly just used for CSV transformations.

Dockerfile:

FROM XXXXXXXXXXXX.dkr.ecr.eu-central-1.amazonaws.com/aws-cli:latest
RUN yum install unzip -y -q
RUN python --version
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Va --nofiles --nodigest
RUN yum -y install python-wheel
RUN yum -y install python-pandas
...

Since Pandas were not available from core repos i started by adding a repo for epel, and installed python-pandas from there. Added also some suggestions (rpm -Va --nofiles --nodigest, yum -y install python-wheel) But as you can see below it complains because it does not find python-matplotlib, tried to install this package but could not find it.

Since i don't need to plot anything anyways, i tried the suggestion of --skip-broken, this allowed me to complete the installation, but when importing from my python script (import pandas as pd), gives the error ImportError: No module named pandas.

What am i missing here?

gefragt vor 2 Jahren247 Aufrufe
1 Antwort
0

It end up just changing the Dockerfile to:

RUN yum install python2-pip -y
RUN pip install pandas

Note: by default AMI2 ships with python 2.7

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen