[`setuptools` is being removed as of Python 3.12](https://docs.python.org/3.12/whatsnew/3.12.html#removed), and with it `pkg_resources`. The simplest fix might be to specify and use the [`packaging` module](https://pypi.org/project/packaging/) instead.