Looking for correct image with Python 3

Hey guys!

Can someone point me to the correct OS docker image that has Python 3 on it?
I wanted to install Adadfruit-Blinka but balenaOS reports as Generic Linux PC which isn’t supported.

Any other into on using GPIO in a balenaOS container greatly appreciated.

Thanks,
Paul

Hey, knowing the board will help us better in finding the supported lib, which board are you using?you can also refer to https://www.balena.io/docs/learn/develop/hardware/gpio/ we list a few libs there which might help. if you need that specific library, you can try building it on balenaOs and using that as your docker source. https://github.com/adafruit/Adafruit_Blinka#building-locally. you can also check the dockerfile in this project https://github.com/balena-io-examples/balena-python-hello-world to see how to setup python 3 on balenaOs

My apologies, I forgot to mention it is a Pi3B board. Thanks for the resource links, I’ll give them a read.
The primary issue with the Blinka library is that instead of you setting the board type, it auto-detects it, and the way it does so shows the board as “Generic Linux PC”, which is not supported by the library.

It’s not a huge deal, as I’ll just add a rapbian container and implement it that way, but not sure which of the balenalib docker images contains python 3 as they are not tags as such. Again not a big deal, I’ll just upgrade from the Dockerfile, but better not to have to, and the fact that Python 2.7 is now EOL.

Thanks again.

OK, I think I just realized how the images are ordered in GH, so I may have found the answer.

Great, have a look at https://hub.docker.com/r/balenalib/raspberrypi3-python in case, there should be a couple of python 3 tags you can use from that one

You can use this one I think balenalib/raspberrypi3-python:3.8.3.
Also it looks like you can force blinka to detect your device as a rpi3b: https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/adafruit_platformdetect/board.py#L61

Set the BLINKA_FORCEBOARD environment variable toRASPBERRY_PI_3B.

Thanks all :slight_smile: