Raspberry Pi Powered live Train station monitor

Hi I posted a comment on the blog post about the live train station monitor as I’m having issues pushing the file to balena. Chris suggested posting a topic here to work out what is going wrong.

This is the full build log:

[Info]     Starting build for Train_monitor, user gh_gritchie1
[Info]     Dashboard link: https://dashboard.balena-cloud.com/apps/1582631/devices
[Info]     Building on arm03
[Info]     Pulling previous images for caching purposes...
[Success]  Successfully pulled cache images
[main]     Step 1/10 : FROM balenalib/raspberrypi3-64-debian-python:3.7-buster
[main]      ---> b7a18c70cfb9
[main]     Step 2/10 : RUN install_packages         jq         moreutils         libopenjp2-7         libfreetype6-dev         libjpeg-dev         libtiff5
[main]     Using cache
[main]      ---> c3be1120cede
[main]     Step 3/10 : WORKDIR /usr/app
[main]     Using cache
[main]      ---> 99f5f67bcb75
[main]     Step 4/10 : COPY ./requirements.txt .
[main]     Using cache
[main]      ---> c07ac08a8210
[main]     Step 5/10 : RUN pip install -r requirements.txt --index-url=https://www.piwheels.org/simple
[main]      ---> Running in 84f5650a599b
[main]     Looking in indexes: https://www.piwheels.org/simple
[main]     Collecting luma.oled
[main]       Downloading https://www.piwheels.org/simple/luma-oled/luma.oled-3.4.0-py2.py3-none-any.whl
[main]     Collecting timeloop
[main]       Downloading https://www.piwheels.org/simple/timeloop/timeloop-1.0.2-py3-none-any.whl
[main]     Collecting requests
[main]       Downloading https://www.piwheels.org/simple/requests/requests-2.22.0-py2.py3-none-any.whl (57kB)
[main]     Collecting luma.core>=1.12.0
[main]       Downloading https://www.piwheels.org/simple/luma-core/luma.core-1.12.0-py2.py3-none-any.whl (51kB)
[main]     Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
[main]       Downloading https://www.piwheels.org/simple/urllib3/urllib3-1.25.8-py2.py3-none-any.whl (125kB)
[main]     Collecting chardet<3.1.0,>=3.0.2
[main]       Downloading https://www.piwheels.org/simple/chardet/chardet-3.0.4-py2.py3-none-any.whl (133kB)
[main]     Collecting idna<2.9,>=2.5
[main]       Downloading https://www.piwheels.org/simple/idna/idna-2.8-py2.py3-none-any.whl (58kB)
[main]     Collecting certifi>=2017.4.17
[main]       Downloading https://www.piwheels.org/simple/certifi/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
[main]     ERROR: Could not find a version that satisfies the requirement pillow>=4.0.0 (from luma.core>=1.12.0->luma.oled->-r requirements.txt (line 1)) (from versions: none)
[main]
[main]     ERROR: No matching distribution found for pillow>=4.0.0 (from luma.core>=1.12.0->luma.oled->-r requirements.txt (line 1))
[main]
[main]     WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
[main]     You should consider upgrading via the 'pip install --upgrade pip' command.
[main]
[main]     Removing intermediate container 84f5650a599b
[main]     The command '/bin/sh -c pip install -r requirements.txt --index-url=https://www.piwheels.org/simple' returned a non-zero code: 1
[Info]     Uploading images
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: The command '/bin/sh -c pip install -r requirements.txt --index-url=https://www.piwheels.org/simple' returned a non-zero code: 1
[Info]     Built on arm03
[Error]    Not deploying release.
Remote build failed

Additional information may be available by setting a DEBUG=1 environment
variable: "set DEBUG=1" on a Windows command prompt, "$env:DEBUG = 1" on
powershell, or "export DEBUG=1" on Linux or macOS.

If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io

For CLI bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/

Hopefully this helps identify the issue.

Thanks,
Gregor

Gregor, for this one, I’ll attempt to duplicate this, but as a quick test, in the Dockerfile, try replacing %%BALENA_MACHINE_NAME%% with ‘raspberrypi3’ (without the quotations). I suspect this is an issue with using a 64-bit container.

Hi,

I tried changing this but I got the same error code.

Thanks,
Gregor

Thanks Gregor, we had a look at this, and indeed something about the pip installation process changed, that we were unaware of. We’ve pushed an update that solves the issue, and, if you re-download the application (or delete it and git clone it once again), you should be able to build it successfully now. Thanks for brining it to our attention!

Brilliant, I’ll try it justnow!

That seems to have solved it! Thanks for the help!

Great, thanks for letting us know this broke!

:slight_smile:

This issue still seems to reside. Building for a raspberry pi 4, but using a raspberrypi3 image. I still get:

[jupyter]  Step 4/12 : RUN pip install numpy pandas matplotlib -i https://www.piwheels.org/simple && pip install jupyter jupyterlab
[jupyter]   ---> Running in 0dcf3ceaede8
[jupyter]  Looking in indexes: https://www.piwheels.org/simple
[jupyter]  ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
[jupyter]  
[jupyter]  ERROR: No matching distribution found for numpy

Hi Nathan ,
when you are saying ‘using a raspberrypi3 image’ do you mean you have modified the FROM line in dockerfile.template from %%BALENA_MACHINE_NAME%% to ‘raspberrypi3’ as indicate earlier in this thread ?

Yea, I changed it to use balenalib/raspberrypi3-debian-python. Not using any templating.

Hi Nathan, can you please try pulling the latest source code for the project, and try again? There was a fix for it that removes piwheels, which should fix the issue. The error you are seeing doesn’t seem related to the OS image.