where a Python module we presume installed was not installed on the system, resulting in the same cryptic error.
Your system python has a broken, or missing, urllib.
> ImportError: No module named request
just above
> real_configure:98992: error: Package directory missing. Re-run bootstrap.
(this error message is likely misleading)
Hopefully, installing urllib will get you through this one.
By the way, can you install python3.12 or later (with the necessary for
development packages)?
Then you can pass it to ./configure in --with-python= option.
Or, even better, switch to using python3.12 or newer as the system Python?
We don't support python3.11 (which you have as /usr/bin/python3) anymore.
Theoretically, Sage would be capable of builing a suitable
Python, but practically this is mostly broken.