Can't install i2c or ina219 via palette or manually under nodered 4.0.5

I think this is the key error

See distutils is removed in Python 3.12 · Issue #2869 · nodejs/node-gyp · GitHub for the reason. Python 3.12 does not have that module. node-gyp was fixed at version 10, but you only have 8.4.1.

Can you drop Python back to 3.10?

I don't know whether it is possible to upgrade node-gyp or if that will cause other problems.