Errors error: ‘Py_SET_TYPE’ was not declared in this scope

I built tvm from source in WSL2 and tried to move on to Python Package Installation. Note, when I built tvm, my system Python is 3.10.x but for Python Package Installation I created a conda env, activated it, installed the dependencies and ran python setup.py install in the conda env to get:

.
.
.
  PkgResourcesDeprecationWarning,
Downloading https://files.pythonhosted.org/packages/be/32/fe988b206479617900212ee87895104bddc1e4d30d51d75db20b6c9b0a0b/ml_dtypes-0.4.0b1.tar.gz#sha256=52e51a8db3547e763cb42411703efa418849a6c4b4caed0a6bda86e3325ae7a3
Best match: ml-dtypes 0.4.0b1
Processing ml_dtypes-0.4.0b1.tar.gz
Writing /tmp/easy_install-oi4x2smi/ml_dtypes-0.4.0b1/setup.cfg
Running ml_dtypes-0.4.0b1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-oi4x2smi/ml_dtypes-0.4.0b1/egg-dist-tmp-3exqsqln
/home/nyck33/miniconda3/envs/tvm-37/lib/python3.7/site-packages/setuptools/config/pyprojecttoml.py:108: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
  warnings.warn(msg, _BetaConfiguration)
/home/nyck33/miniconda3/envs/tvm-37/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from ml_dtypes/_src/dtypes.cc:33:
ml_dtypes/_src/custom_float.h: In function ‘bool ml_dtypes::RegisterFloatDtype(PyObject*)’:
ml_dtypes/_src/custom_float.h:942:3: error: there are no arguments to ‘Py_SET_TYPE’ that depend on a template parameter, so a declaration of ‘Py_SET_TYPE’ must be available [-fpermissive]
  942 |   Py_SET_TYPE(&descr_proto, &PyArrayDescr_Type);
      |   ^~~~~~~~~~~
ml_dtypes/_src/custom_float.h:942:3: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from ml_dtypes/_src/dtypes.cc:34:
ml_dtypes/_src/int4_numpy.h: In function ‘bool ml_dtypes::RegisterInt4Dtype(PyObject*)’:
ml_dtypes/_src/int4_numpy.h:842:3: error: there are no arguments to ‘Py_SET_TYPE’ that depend on a template parameter, so a declaration of ‘Py_SET_TYPE’ must be available [-fpermissive]
  842 |   Py_SET_TYPE(&descr_proto, &PyArrayDescr_Type);
      |   ^~~~~~~~~~~
In file included from ml_dtypes/_src/dtypes.cc:33:
ml_dtypes/_src/custom_float.h: In instantiation of ‘bool ml_dtypes::RegisterFloatDtype(PyObject*) [with T = Eigen::bfloat16; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:226:36:   required from here
ml_dtypes/_src/custom_float.h:942:14: error: ‘Py_SET_TYPE’ was not declared in this scope
  942 |   Py_SET_TYPE(&descr_proto, &PyArrayDescr_Type);
      |   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ml_dtypes/_src/custom_float.h: In instantiation of ‘bool ml_dtypes::RegisterFloatDtype(PyObject*) [with T = ml_dtypes::float8_internal::float8_e4m3b11fnuz; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:229:46:   required from here
ml_dtypes/_src/custom_float.h:942:14: error: ‘Py_SET_TYPE’ was not declared in this scope
ml_dtypes/_src/custom_float.h: In instantiation of ‘bool ml_dtypes::RegisterFloatDtype(PyObject*) [with T = ml_dtypes::float8_internal::float8_e4m3fn; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:232:41:   required from here
ml_dtypes/_src/custom_float.h:942:14: error: ‘Py_SET_TYPE’ was not declared in this scope
ml_dtypes/_src/custom_float.h: In instantiation of ‘bool ml_dtypes::RegisterFloatDtype(PyObject*) [with T = ml_dtypes::float8_internal::float8_e4m3fnuz; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:235:43:   required from here
ml_dtypes/_src/custom_float.h:942:14: error: ‘Py_SET_TYPE’ was not declared in this scope
ml_dtypes/_src/custom_float.h: In instantiation of ‘bool ml_dtypes::RegisterFloatDtype(PyObject*) [with T = ml_dtypes::float8_internal::float8_e5m2; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:238:39:   required from here
ml_dtypes/_src/custom_float.h:942:14: error: ‘Py_SET_TYPE’ was not declared in this scope
ml_dtypes/_src/custom_float.h: In instantiation of ‘bool ml_dtypes::RegisterFloatDtype(PyObject*) [with T = ml_dtypes::float8_internal::float8_e5m2fnuz; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:241:43:   required from here
ml_dtypes/_src/custom_float.h:942:14: error: ‘Py_SET_TYPE’ was not declared in this scope
In file included from ml_dtypes/_src/dtypes.cc:34:
ml_dtypes/_src/int4_numpy.h: In instantiation of ‘bool ml_dtypes::RegisterInt4Dtype(PyObject*) [with T = ml_dtypes::i4<signed char>; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:245:31:   required from here
ml_dtypes/_src/int4_numpy.h:842:14: error: ‘Py_SET_TYPE’ was not declared in this scope
  842 |   Py_SET_TYPE(&descr_proto, &PyArrayDescr_Type);
      |   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ml_dtypes/_src/int4_numpy.h: In instantiation of ‘bool ml_dtypes::RegisterInt4Dtype(PyObject*) [with T = ml_dtypes::i4<unsigned char>; PyObject = _object]’:
ml_dtypes/_src/dtypes.cc:248:32:   required from here
ml_dtypes/_src/int4_numpy.h:842:14: error: ‘Py_SET_TYPE’ was not declared in this scope
error: Setup script exited with error: command '/usr/bin/gcc' failed with exit code 1

The Python version used in the conda env is 3.7

I read that " The Py_SET_TYPE function was introduced in Python 3.9. If you’re using an earlier Python version in your environment, this could explain the error. It seems to contradict the requirement of avoiding Python 3.9.X+ mentioned by TVM, but this particular part of the code might need a newer Python version." but your docs say use Python 3.7.x or 3.8.x