Starting with Python 3.12, we have to explicitly install setuptools:
gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.
Starting with Python 3.12, we have to explicitly install
setuptools
: