pip 22 supports Python ≥ 3.6; Python 3.12 satisfies this. However, Python 3.12 removed `distutils` from the stdlib. If any package depends on `distutils` directly (not via `setuptools`), it will fail to build on Python 3.12 regardless of pip version. Upgrade pip to avoid edge cases and get the improved dependency resolver.