Module (user) is missing interpreter line

I have been trying to run a Ansible playbook on a checkpoint management console but run into this error every time.

Ansible version = 2.6.1
python version = 2.7.12

I have already got a reply:

In any case, the problem seems to be that you have a ‘user’ file in your PYTHONPATH, /usr/share/ufw/user.rules that is being detected as a ‘module’ which takes precedence over the built in user module.

I was just wondering how to fix the problem mentioned above.

Thanks!

If it’s being caused by /usr/share/ufq being in the PYTHONPATH, removing /usr/share/ufw from PYTHONPATH is what I’d suggest.