The path detection script uses distutils to find out where it should install to, but this is not part of Python 3.12. Explicitly pass install path.