Builder stuck on building wheel for numpy

I have been successfully developing this application for weeks, and just yesterday I started having problems with it hanging while “Building wheel for numpy (PEP 517)”. I have tried canceling the process and restarting, but it always gets hung. The following messages just keep scrolling on the screen.

[automated_testing_button_panel]     Step 9/12 : RUN pip3 install -r requirements.txt
[automated_testing_button_panel]      ---> Running in c6f319abaac4
[automated_testing_button_panel]     Collecting gpiozero
[automated_testing_button_panel]       Downloading gpiozero-1.5.1-py2.py3-none-any.whl (138 kB)
[automated_testing_button_panel]     Collecting Pyro4
[automated_testing_button_panel]       Downloading Pyro4-4.80-py2.py3-none-any.whl (89 kB)
[automated_testing_button_panel]     Collecting pySerial
[automated_testing_button_panel]       Downloading pyserial-3.4-py2.py3-none-any.whl (193 kB)
[automated_testing_button_panel]     Collecting numpy
[automated_testing_button_panel]       Downloading numpy-1.18.5.zip (5.4 MB)
[automated_testing_button_panel]       Installing build dependencies: started
[automated_testing_button_panel]       Installing build dependencies: finished with status 'done'
[automated_testing_button_panel]       Getting requirements to build wheel: started
[automated_testing_button_panel]       Getting requirements to build wheel: finished with status 'done'
[automated_testing_button_panel]         Preparing wheel metadata: started
[Info]                               Still Working...
[Info]                               Still Working...
[Info]                               Still Working...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]         Preparing wheel metadata: still running...
[Info]                               Still Working...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]         Preparing wheel metadata: still running...
[automated_testing_button_panel]         Preparing wheel metadata: finished with status 'done'
[automated_testing_button_panel]     Collecting RPi.GPIO
[automated_testing_button_panel]       Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
[automated_testing_button_panel]     Collecting colorzero
[automated_testing_button_panel]       Downloading colorzero-1.1-py2.py3-none-any.whl (33 kB)
[automated_testing_button_panel]     Collecting serpent>=1.27; python_version >= "3.2"
[automated_testing_button_panel]       Downloading serpent-1.30.2-py3-none-any.whl (9.6 kB)
[automated_testing_button_panel]     Using legacy 'setup.py install' for RPi.GPIO, since package 'wheel' is not installed.
[automated_testing_button_panel]     Building wheels for collected packages: numpy
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): started
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[Info]                               Still Working...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...
[Info]                               Still Working...
[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                               Still Working...

Hello,
How long have you let it run before restarting? I’ve seen numpy take quite a long time to build on occasion. Are you building this on the balenaCloud builders or locally on the device?

I am building this on balenaCloud. So far it has been running for nearly 1 hour. It didn’t used to take anything near this long.

I would like to be able to build locally, but I need the “production” OS so I can use the serial port.

An hour does sound like a long time. I would let it run a bit longer to see if it fails with an error of some sort that would help troubleshoot. Is there anything that may have changed with your application or Dockerfile when you started having the hanging issue?
Just FYI, you can build locally using a development image, more information here: https://www.balena.io/docs/learn/develop/local-mode/

It is still running with the following repeated messages, and I can’t think of anything that I changed with the application that would be causing this issue. I am working on some internal logic.

[automated_testing_button_panel]       Building wheel for numpy (PEP 517): still running...
[Info]                                 Still Working...

In the past I couldn’t use the UART with the development image, is this still the case?

It just stopped, without error, and went back to a command prompt. Not sure what that means. The last message was

[Info] Still Working...

UPDATE: I started it again and it ran all the way through. I don’t know what happened to make it stop and now work.

Glad to hear it went all the way through without hanging. It would be good to know why it happened and what made it stop. Please keep us posted on this thread if you run into any more issues.
Looking into the UART on development image question, but you can use balena ssh in local mode to access the device.

According to this documentation, you should be able to connect to a development image using serial: https://www.balena.io/docs/reference/OS/overview/2.x/#development-vs-production-images