Error building django in windows

Hi,
I followed this tutorial to install the development version of django on windows 11 with python 3.7.9:
Writing your first patch for Django

pip fails with the following error:

Obtaining file:///D:/Projects/django
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [64 lines of output]
      Traceback (most recent call last):
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\expand.py", line 81, in __getattr__
          for target, value in self._find_assignments()
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\expand.py", line 82, in <genexpr>

          if isinstance(target, ast.Name) and target.id == attr
        File "C:\Users\Adityar\AppData\Local\Programs\Python\Python37\lib\ast.py", line 91, in literal_eval
          return _convert(node_or_string)
        File "C:\Users\Adityar\AppData\Local\Programs\Python\Python37\lib\ast.py", line 90, in _convert
          return _convert_signed_num(node)
        File "C:\Users\Adityar\AppData\Local\Programs\Python\Python37\lib\ast.py", line 63, in _convert_signed_num
          return _convert_num(node)
        File "C:\Users\Adityar\AppData\Local\Programs\Python\Python37\lib\ast.py", line 55, in _convert_num
          raise ValueError('malformed node or string: ' + repr(node))
      ValueError: malformed node or string: <_ast.Call object at 0x00000198C2340EC8>

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\expand.py", line 189, in read_attr
          return getattr(StaticModule(module_name, spec), attr_name)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\expand.py", line 85, in __getattr__
          raise AttributeError(f"{self.name} has no attribute {attr}") from e
      AttributeError: django has no attribute __version__

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "d:\venvs\django-dev-venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "d:\venvs\django-dev-venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "d:\venvs\django-dev-venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel     
          return hook(config_settings)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\build_meta.py", line 178, in get_requires_for_build_wheel
          config_settings, requirements=['wheel'])
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\build_meta.py", line 159, in _get_build_requires
          self.run_setup()
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\build_meta.py", line 282, in run_setup  
          self).run_setup(setup_script=setup_script)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\build_meta.py", line 174, in run_setup  
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 31, in <module>
          setup()
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 151, in setup 
          dist.parse_config_files()
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\dist.py", line 866, in parse_config_files
          self, self.command_options, ignore_option_errors=ignore_option_errors
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 172, in parse_configuration
          meta.parse()
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 451, in parse 
          section_parser_method(section_options)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 422, in parse_section
          self[name] = value
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 243, in __setitem__
          value = parser(value)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 557, in _parse_version
          return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 377, in _parse_attr
          return expand.read_attr(attr_desc, package_dir, root_dir)
        File "C:\Users\Adityar\AppData\Local\Temp\pip-build-env-9wqbu9i_\overlay\Lib\site-packages\setuptools\config\expand.py", line 193, in read_attr
          return getattr(module, attr_name)
      AttributeError: module 'django' has no attribute '__version__'

It would be really helpful if someone could help me with this.

See Django 4.0 release notes | Django documentation | Django

Django 4.0 supports Python 3.8, 3.9, and 3.10. We highly recommend and only officially support the latest release of each series.

The Django 3.2.x series is the last to support Python 3.6 and 3.7.