[SOLVED]Python snap targeting CM3/raspberry pi 3

I am attempting to snap python application targeting a CM3 module. I realized I was not able to do this from an AMD64 host machine so I setup a raspberry pi 3 with arm64 ubuntu image to have as a build system.

As multipass does not work on the pi. I found information that I should use LXD container. So I used the building manually instructions on the https://snapcraft.io/docs/build-on-lxd page.

When I run: “snapcraft --destructive-mode” I get the following error:

Could not find a required package in ‘build-packages’: python3-pip

python3-pip is installed on the pi 3 system.

I have seen this if an apt update hasn’t been done recently. Also, what version of Ubuntu are you running on the Pi?

1 Like

Thanks for the reply,

I am running “ubuntu-18.04.4-preinstalled-server-arm64+raspi3.img”

Oh yes you are correct. I ran sudo apt update inside the container and then retried snapcraft --destructive-mode and all is working correctly.

Thank you!

1 Like

i’d really re-consider using arm64 …
it has no benefit at all on a pi3.
arm64 binaries will always allocate 64bit address sizes in ram even if your app (99% of the apps that is) will only allocate 32bit values in it … so you are effectively just killing all your (1GB of) ram on the device for no reason …

1 Like

Thanks for the advice.

I previously had some issues getting snapcraft working on a 32bit image and then tried the 64bit currently. Now I think I will go back to a 32bit image and set that up. Cause I agree that the RAM savings would be beneficial.

1 Like