Error While Setup Production in local instance

sudo bench setup production frappe

Setting Up prerequisites…
$ bench setup role fail2ban
ModuleNotFoundError: No module named ‘_cffi_backend’
thread ‘’ panicked at /usr/share/cargo/registry/pyo3-0.20.2/src/err/
Python API call failed
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
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 1.
ERROR: bench setup role fail2ban
subprocess.CalledProcessError: Command ‘bench setup role fail2ban’ returned non-zero exit status 1.

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

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
File “/usr/local/lib/python3.10/dist-packages/bench/”, line 132, in cli
File “/usr/local/lib/python3.10/dist-packages/bench/commands/”, line 110, in setup_production
setup_production(user=user, yes=yes)
File “/usr/local/lib/python3.10/dist-packages/bench/config/”, line 37, in setup_production
File “/usr/local/lib/python3.10/dist-packages/bench/config/”, line 28, in setup_production_prerequisites
exec_cmd(“bench setup role fail2ban”)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/”, line 178, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench setup role fail2ban