Is pandas library in pyhton supported by Balena ?

Hello,

I’m trying to install pandas to use some function in a pyhton code but I encounter some difficuties to install it. I tried to put it in requirements.txt and I also tried directly from DockerFile via pip install pandas but both are not working. I’m wondering if pandas is available on balena. (btw I’m using python 3 stretch image)

Thank you for your help !

Hugo

1 Like

Hello @Hugo thanks for your question!

Is there any restriction why you are using the python 3 stretch image? did you try with other images with python? what error do you get?

Thanks @HughCalum for your message and welcome to the balena community!

@Hugo did you solve your problem using the Panda library?

Hello,

Indeed I solved it partially. There is a way to implement it via Dockerfile as shown here:

FROM python:3

RUN apt-get update && apt-get install -y --no-install-recommends
build-essential
python-dev
&& rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

RUN pip install --no-cache-dir flask pandas

COPY . ./

ENV UDEV=1

CMD [“python”, “-u”, “app.py”]

But the thing is that I want to stay on python stretch and I want to use sudo command in my python code(and the compilation is 20 min this way). When I try to upload via requirements it did not work . I have this error : ERROR: Could not find a version that satisfies the requirement pandas==2.0.2. I tried different version and it didn’t work . Indeed I aslo want to upload numpy library and it didn’t work too seems that PEP 517 is not working I have this error when I put numpy in requirements: ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly / ERROR: Failed building wheel for numpy.

1 Like

Hello,

Is someone having the same issue ? I’m still stuck on it.

BR,

Hugo