Closed shawaj closed 1 year ago
I can confirm I tested with it rolled back and it works fine on this release https://github.com/NebraLtd/helium-miner-software/pull/583
Python module not importing: https://github.com/radxa/apt/issues/51#issuecomment-1385616820
@NebraLtd/developers could it be that the package is loading in the wrong place?
https://github.com/NebraLtd/hm-config/blob/f6e894fe91fdb6884cf086e6c5887a0c327d388a/Dockerfile#L84
Hmm that still didn't seem to fix it @KevinWassermann94 so I'm out of ideas now
Actually it looks like Balena are using 3.11.1 as standard here (line42)... https://hub.docker.com/layers/balenalib/raspberry-pi-debian-python/bullseye-run-20221215/images/sha256-ef1449f6388354cc9381d0a76941b6dcd43210cd4e5c19dabc0774fdd4047eb5?context=explore
Possibly needs to just be python3 in path..
Line 47...
ENV PYTHONPATH=/usr/lib/python3/dist-packages:
@MuratUrsavas @pritamghanghas Can you have a look at this and we'll discuss tomorrow?
Looking at it - I think that the libmraa is not built for python3.11 only python 2.7 and 3.9. Might be wrong but we are missing files
https://github.com/radxa/apt/issues/51#issuecomment-1385801756
I can confirm that if I pull the mraa.py
and _mraa.so
files out of the deb package in the repo and put them in /usr/local/lib/python3.9/dist-packages
it works correctly.
So seems package is built incorrectly. Have reported on radxa repo https://github.com/radxa/apt/issues/51#issuecomment-1386325669
This problem is different but just for information.
I have faced problems in the past due to balena docker base image having too recent a python. It seems they go out of their way to install latest python3 in their base images. That is why we use venv and install upstream python and use venv even though newer python is already there in the base image.
If we use balena python version, some large pip packages resort to compiling from source taking a lot of time and sometimes even failing. If it doesn't break anything, moving away to non balena debian image will solve lot of that.
@pritamghanghas yep that seems to be the case here too. Bullseye standard python is 3.9.2. Balena are using 3.11.1 in this image.
The venv makes it back to 3.9.2 but the dist-packages for mraa aren't getting installed properly.
If it doesn't break anything, moving away to non balena debian image will solve lot of that.
Potentially a good option although we should be careful. Actually we were originally using some non Balena ones. The reason we moved to the Balena ones was because of tools like install_packages and stuff that the have in them as well as some other stuff (they are well tested on balenaOS etc). I think it was Marvin or Viktor that suggested it... I'll see if I can find the discussion.
EDIT:
See https://github.com/NebraLtd/helium-miner-software/pull/581#issuecomment-1385464535