“I couldn't get any of the referenced code to work without framebuffer errors and segmentation faults. After a good 12 hours of trying on a pi3 and pi4 I came across this GitHub page. Installing everything as sudo for python3 worked a charm. Pity Pimoroni don't supply such good code.
Here it is: https://github.com/EverythingSmartHome/mlx90640-thermal-camera”