Error Msg: The pexpect python module is required

Hi

I am using ansible (version 2.2) for installing a software, where I require “expect” to be used. I have installed the pexpect module (version 4.2) and Python (version 2.7) in the local and remote server.
However, on running ansible script, getting following error:

“module_name”: “expect”

“msg”: “The pexpect python module is required”

Please help.

Regards
Neha

I have similar problem but with a bit different outcome:

Insufficient version of pexpect installed (4.2.1), this module requires pexpect>=3.3. Error was ‘int’ object has no attribute ‘rstrip’"

Ansible version: 2.2.0.0
pexpect version: 4.2.1 (definitely greater than 3.3).

I’m guessing you are trying to supply an integer as one of the responses, try quoting it like “1”