Assuming we agree that the installers job is to install prerequisites it should have practically no prerequisites itself.
Accepted, that git is installed 99% of hosts already, but if it doesn't, then this script should be able to detect and fix it.
Now the other part:
pyenv-installer should install pyenv, which itself is an installer for python (so it should be able to install dependencies ahead, but ...)
so even if pyenv can't install the dependencies of python packages the pyenv installer should be able to do that:
https://github.com/pyenv/pyenv/wiki#suggested-build-environment
(so that pyenv install python 3.10.4 won't fail 30 seconds later).