Install libpam-python by entering the following commands in the terminal:
sudo apt update sudo apt install libpam-python
Enables PAM modules to be written in Python
This PAM module runs the Python interpreter, thus allowing PAM modules to be written in Python. As a Python incurs a considerable overhead its intended audience is SysAdmins writing one off PAM modules. If you are doing that, you should probably install the documentation in libpam-python-doc as well.