'PYTHON_VERSION=3.10' not found! This is the only officially supported

I am getting the following error: 'PYTHON_VERSION=3.10' not found! This is the only officially supported

I do not know why because I have just compiled python 3.10.15 to ${HOME}/gitrepos/blender/extern/python.
does blender 3.6.17 not support python 3.10.15?

Here is my build scripts:
build python
build blender

probably can’t find the headers, is ${PYTHON_INCLUDE_DIR} set to a valid path?

${HOME}/gitrepos/blender/extern/python/ This is where python is being built to.
So the include directory is ${HOME}/gitrepos/blender/extern/python/include/python3.10
pre-build blender