How to use the python bindings on DietPi?

The author recommends DietPi to get the best performance out of an rpi-rgb-led-matrix setup so I have downloaded this OS and installed to a test SD card on a RPI4.

I have installed Python3 using the DietPi optimized software installation system and I have installed rpi-rgb-led-matrix both directly using the included and by using the script provided by Adafruit (link) and yet whenever I try to run my python scripts (which work on Raspian Lite), I get the error 'ModuleNotFoundError: No module named ‘rgbmatrix’.

I cannot figure out how to get this library working on DietPi. Any help would be gratefully received.

I don’t use python, but this looks like you need to install the rpi-rgb-panel bindings in your pythonpath

And modify your Python path to point it to the directory that you built the python bindings in…