3

I am having issues with installing pandas or numpy on Docker on my Raspberry Pi 4 using Python 'slim' version.

This is my Dockerfile.

FROM python:3.8-slim

RUN apt update
RUN python -m pip install --upgrade pip

COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt

CMD [ "python", "./single_script.py" ]

Requirements file:

cached-property==1.5.2
certifi==2021.10.8
charset-normalizer==2.0.10
DateTime==4.3
greenlet==1.1.2
idna==3.3
inflection==0.5.1
mypy-extensions==0.4.3
numpy==1.22.0
pandas==1.3.5
Pillow==9.0.0
pip==21.3.1
psycopg2-binary==2.9.3
python-dateutil==2.8.2
pytz==2021.3
requests==2.27.1
setuptools==60.2.0
six==1.16.0
SQLAlchemy==1.4.29
sqlalchemy-orm==1.2.2
typing_extensions==4.0.1
typing-inspect==0.7.1
urllib3==1.26.8
wheel==0.37.1
zope.interface==5.4.0

This image builds flawlessly on Windows, but fails on Raspberry saying 'wheels could not be built for pandas/numpy'. I tried adding Linux packages like gcc, libdev and other but found no luck.

apt install pandas/numpy Linux package creates a different version of Python3.9 and does not utilize pip which is bound to 3.8.

I see no problems with full version of python:3.8 though. Does this have to do with armv7/32bit that runs on the Raspberry?

  • got the same problem, I tried with the apt install but this only installs on Python2 inside the container – Basile Nov 10 '22 at 16:33
  • secondly the pip takes hours to process – Basile Nov 10 '22 at 16:33
  • try to have a look over there : https://stackoverflow.com/questions/49037742/why-does-it-take-ages-to-install-pandas-on-alpine-linux – Basile Nov 17 '22 at 10:32

0 Answers0