Bench setup production bench not working

[WARNING]: Updating cache and auto-installing missing dependency: python3-apt
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "allow_change_held_packages": false,
            "allow_downgrade": false,
            "allow_unauthenticated": false,
            "autoclean": false,
            "autoremove": false,
            "cache_valid_time": 0,
            "clean": false,
            "deb": null,
            "default_release": null,
            "dpkg_options": "force-confdef,force-confold",
            "fail_on_autoremove": false,
            "force": false,
            "force_apt_get": false,
            "install_recommends": null,
            "lock_timeout": 60,
            "name": "fail2ban",
            "only_upgrade": false,
            "package": [
                "fail2ban"
            ],
            "policy_rc_d": null,
            "purge": false,
            "state": "present",
            "update_cache": null,
            "update_cache_retries": 5,
            "update_cache_retry_max_delay": 12,
            "upgrade": "no"
        }
    },
    "msg": "python3-apt must be installed and visible from /usr/bin/python3."
}

PLAY RECAP ***********************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   

ERROR: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '{"production": true, "admin_emails": "", "mysql_root_password": null, "container": false}', '-t', 'fail2ban']' returned non-zero exit status 2.
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 121, in cli
    raise e
  File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/commands/setup.py", line 273, in setup_roles
    run_playbook("site.yml", extra_vars=extra_vars, tag=role)
  File "/usr/local/lib/python3.11/site-packages/bench/utils/__init__.py", line 322, in run_playbook
    subprocess.check_call(args, cwd=os.path.join(bench.__path__[0], "playbooks"))
  File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '{"production": true, "admin_emails": "", "mysql_root_password": null, "container": false}', '-t', 'fail2ban']' returned non-zero exit status 2.
ERROR: 
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 121, in cli
    raise e
  File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bench/commands/setup.py", line 72, in setup_production
    setup_production(user=user, yes=yes)
  File "/usr/local/lib/python3.11/site-packages/bench/config/production_setup.py", line 33, in setup_production
    setup_production_prerequisites()
  File "/usr/local/lib/python3.11/site-packages/bench/config/production_setup.py", line 24, in setup_production_prerequisites
    exec_cmd("bench setup role fail2ban")
  File "/usr/local/lib/python3.11/site-packages/bench/utils/__init__.py", line 153, in exec_cmd
    raise CommandFailedError
bench.exceptions.CommandFailedError

I’m getting following error on running sudo bench setup production $USER
I’m using debian 11 os.
I’m stuck on this from long time.
Thanks for the help

I don’t think debian 11 is supported by ERPNext that too for production