New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/34030#issuecomment-986046857 Comment: > That script has a wrong shebang... Indeed: originally I had a patch to skip 03-rewrite-python-shebang because there was a failure running this hook. Later I discovered that the failure would go away by adding `python_version=3` to the template, so I removed the patch. However, many of the python scripts with shebangs that point to python inside the sage venv are broken. The simple fix/workaround would be to reinstate this patch for now and skip rewriting all the shebangs. I'm still hoping that sage-9.5 can work with system python 3.10 by the time it's released, but at the moment [trac #30766](https://trac.sagemath.org/ticket/30766) is a bit outdated and it was far from working last time I tried. I've just noticed that [trac #30767](https://trac.sagemath.org/ticket/30767) has just been rebased on top of a handful of other tickets with positive_review so I'm more hopeful of that.