bandit-config-generator command not found

In this troubleshooting guide we learn how to fix bandit-config-generator command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

bandit-config-generator: command not found

or when using sudo you get the following error message

sudo: bandit-config-generator: command not found

Solutions to bandit-config-generator: command not found

How To Fix bandit-config-generator: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu bandit-config-generator is provided by python3-bandit package.

python3-bandit is:

Bandit is a tool designed to find common security issues in Python code. To do this Bandit processes each file, builds an Abstract Syntaxt Tree (AST), and runs appropriate plugins against the AST nodes. Once Bandit has finished scanning all the files it generates a report.

This package contains the Python 3.x module.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-bandit

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-bandit.

sudo apt -y install python3-bandit

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-bandit

Summary

In this tutorial we learn how to fix bandit-config-generator command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.