# The pexpect python module is required for Ansible 2.0

**URL:** <https://forum.ansible.com/t/the-pexpect-python-module-is-required-for-ansible-2-0/20847>\
**Category:** Ansible Developer\
**Created:** [March 11, 2016, 8:34pm UTC](https://forum.ansible.com/t/the-pexpect-python-module-is-required-for-ansible-2-0/20847 "2016-03-11T20:34:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debabrat\_panda](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@Debabrat\_panda](https://forum.ansible.com/u/Debabrat_panda)\
**Post date:** [March 11, 2016, 8:34pm UTC](https://forum.ansible.com/t/the-pexpect-python-module-is-required-for-ansible-2-0/20847/1 "2016-03-11T20:34:07Z")

</div>

Hi There,

I am using ‘expect’ module in my ymal.  
Before using this, I install ‘pip install pexpect’.  
And, ran the ansible-playbook command and got this error.

FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“chdir”: null, “command”: “keytool -import”, “creates”: null, “echo”: false, “removes”: null, “responses”: {“Question”: [true]}, “timeout”: 30}, “module\_name”: “expect”}, “msg”: “The pexpect python module is required”}

Can you please help?

Thanks

Debabrat

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 11, 2016, 9:14pm UTC](https://forum.ansible.com/t/the-pexpect-python-module-is-required-for-ansible-2-0/20847/2 "2016-03-11T21:14:48Z")

</div>

This is not Ansible itself, but the expect module.

Many plugins require extra things to work, in this case it is visible in the ‘Requriements’ section of the module’s docs:

[http://docs.ansible.com/ansible/expect\_module.html#requirements-on-host-that-executes-module](http://docs.ansible.com/ansible/expect_module.html#requirements-on-host-that-executes-module)
