Frappe bench v10.x.x throws syntax error on bench version

I am trying to install and use bench version 10. The commands which I followed are:

bench init bench-v10
cd bench-v10
bench version --format plain # prints frappe 15.x.x-develop develop (273545d)

bench switch-to-branch v10.x.x
bench version --format plain # throws a syntax error

The error is as follows:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/home/arun-zerodhatech/bench-v10/apps/frappe/frappe/__init__.py", line 326
    from frappe.async import publish_realtime
                ^^^^^
SyntaxError: invalid syntax

Is this the right way to install frappe version 10? If so, what is the cause of above syntax error and how to fix it?

@mike.gopal ,

Are you trying to install Frappe and ERPNext version 10?

May be your python version 3.10 will not support?

You need to upgrade your Frappe and ERPNext version 15 if you have python version 3.10.

Thanks
Suresh

Yes, I am trying to install frappe version 10. The issue is with python as since python version 3, async has become a reserved word. Now, I am trying to fix it by installing frappe version 10 with python2.7.

To this end, I have installed python 2.7 and created an virtualenv but bench uses python3.