There's a closed pull request on the void-packages repository sagemath: fix for python 3.11 https://github.com/void-linux/void-packages/pull/40369 Description: #### Testing the changes - I tested the changes in this PR: **YES** Without this sagemath is completely broken on python 3.11 (as in: won't even start). With this I've run tests (on x86_64) both in normal and `--long` mode, all pass. I also installed the package and run from CLI: ``` $ sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.7, Release Date: 2022-09-19 │ │ Using Python 3.11.0. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ sage: 2+2 4 ``` All patches added have been submitted upstream see https://trac.sagemath.org/ticket/33842#comment:79. Hopefully everything will be upstream in sagemath 9.8. Ping @ahesford