Pushing image not working

Can you try with FROM balenalib/amd64-debian:buster?

@anujdeshpande same error showed up again

Hi @Xia

I’ve taken over support from Anuj for the next few hours. Just to make sure what we’re currently looking at, can you please just send me the Dockerfile that you’re currently using? Are you running the build locally? Can you please send me the exact build command you’re running?

Thank you
Alida

@AlidaOdendaal Hi, I PM the Dockerfile

Thanks @Xia . Just to confirm - is the device type associated with the balenacloud application raspberry pi 3?

@AlidaOdendaal I use Balena Fin. But I tried with fincm3 and it shows the same error with cannot import Numpy

Hey there! I’m not sure if the message was wrong, but the Dockerfile you sent us has several lines commented out, such as:

#COPY requirements.txt ./

Can you confirm that you are not accidentally commenting out some Dockerfile directives, and that i.e. requirements.txt is not getting copied as a side effect?

@jviotti Yes what I sent is the one successfully pushed to balena image; the commented one is from the previous suggestion

Can you show us the full output of the pip3 install pyaudio numpy matplotlib scipy and pip3 install -r requirements.txt commands? They might reveal where the packages are actually getting installed, which might be a location where the python executable is not looking at?

Can you also send us the link to the device and enable support access so we can inspect it more closely?

@jviotti PM

Hi @Xia can you try ensure you are using the apt installed python3 and use the plain debian image that doesn’t have python already added. I would try something like this:

FROM balenalib/raspberrypi3-debian:latest

RUN install_packages python3 python3-pip 

RUN pip3 install numpy

And then check if numpy correctly imports

One other thing that might be worth noting if you are on a Fin/pi3 is you can use prebuilt wheels. There is an example of it in our balena-cam project: https://github.com/balenalabs/balena-cam/blob/master/balena-cam/Dockerfile.template#L34 , but basically you can do:

RUN pip3 install numpy==1.15.4  --index-url https://www.piwheels.org/simple

@shaunmulligan Hi, I PM to you

Hi, it looks like libfreetype6 is missing. Since the package is installed with pip instead of apt some of the library dependencies could be missing. I see on the python3-matplotlib debian package page libfreetype6 is required: https://packages.debian.org/buster/python3-matplotlib. Can you please add libfreetype6 at the end of the install_packages line and see how that goes?

@majorz Yes, it is resolved by adding libfreetype6

Nice to hear.