The fluxgui install via setup.py is horribly bit rotted, and doesn't seem to work with setuptools versions bundled with Python 3.10 or 3.11, and distutils was removed from Python 3.12.
If someone wants to fix this, I'd be happy to accept a PR, but I have no intention of fixing this myself. I don't think there's any reason to use fluxgui at this point, just use redshift-gtk instead :)
For more discussion and workarounds, see
#165 (comment)