I've encountered the same issue when attempting to install the aiohttp package or anything that depends on it, which seems to be a lot.
File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers'] File "/usr/lib/python3.10/_distutils_system_mod.py", line 137, in wrapped_load_schemes _inject_headers(name, scheme) File "/usr/lib/python3.10/_distutils_system_mod.py", line 125, in _inject_headers scheme['headers'] = orig_install._load_schemes()['posix_prefix']['headers'] File "/usr/lib/python3.10/_distutils_system_mod.py", line 135, in wrapped_load_schemes schemes = _load_schemes() File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 103, in _load_schemes sysconfig_schemes = _load_sysconfig_schemes() or {} File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/install.py", line 91, in _load_sysconfig_ schemes with contextlib.suppress(AttributeError): RecursionError: maximum recursion depth exceeded [end of output] Failed to build aiohttp ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects