This error happens because Python versions < 3.13 don’t properly infer the extension suffix for compiled libraries like pydantic-core.
pydantic-core
The fix is to use Python 3.13 or later (see python/cpython#95855).