# Looking for correct image with Python 3

**URL:** <https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680>\
**Category:** balenaOS\
**Created:** [May 25, 2020, 12:28am UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680 "2020-05-25T00:28:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![webtop](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/webtop/32/1994_2.png) [@webtop](https://forums.balena.io/u/webtop)\
**Post date:** [May 25, 2020, 12:28am UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/1 "2020-05-25T00:28:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iamsolankiamit](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@iamsolankiamit](https://forums.balena.io/u/iamsolankiamit)\
**Post date:** [May 25, 2020, 7:46am UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/3 "2020-05-25T07:46:47Z")

</div>

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/](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](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](https://github.com/balena-io-examples/balena-python-hello-world) to see how to setup python 3 on balenaOs

---

<div class="post-metadata">

**Author:** ![webtop](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/webtop/32/1994_2.png) [@webtop](https://forums.balena.io/u/webtop)\
**Post date:** [May 25, 2020, 4:21pm UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/5 "2020-05-25T16:21:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![webtop](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/webtop/32/1994_2.png) [@webtop](https://forums.balena.io/u/webtop)\
**Post date:** [May 25, 2020, 4:32pm UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/6 "2020-05-25T16:32:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nazrhom](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nazrhom](https://forums.balena.io/u/nazrhom)\
**Post date:** [May 25, 2020, 4:33pm UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/7 "2020-05-25T16:33:41Z")

</div>

Great, have a look at [https://hub.docker.com/r/balenalib/raspberrypi3-python](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

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [May 25, 2020, 4:37pm UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/8 "2020-05-25T16:37:39Z")

</div>

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](https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/adafruit_platformdetect/board.py#L61)

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [May 25, 2020, 4:40pm UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/9 "2020-05-25T16:40:19Z")

</div>

Set the `BLINKA_FORCEBOARD` environment variable to`RASPBERRY_PI_3B`.

---

<div class="post-metadata">

**Author:** ![webtop](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/webtop/32/1994_2.png) [@webtop](https://forums.balena.io/u/webtop)\
**Post date:** [May 25, 2020, 4:57pm UTC](https://forums.balena.io/t/looking-for-correct-image-with-python-3/118680/11 "2020-05-25T16:57:49Z")

</div>

Thanks all 🙂
