This script has two python modules as requirements, libevdev and inquirer. If you want to run the script with your systemwide python environment, you can try to find the relevant APT packages (often named python-MODULENAME) to install the modules on your system.
Alternatively you can create a python virtual environment (you can easily find howtos) and install the requirements in the virtual environment using the pip tool. This way, the requirements will be installed for this project only.
Also keep in mind to never use pip as sudo, it should not manage your systemwide python modules because it will conflict with your package manager.