# ImportError: cannot import name callbacks

**URL:** <https://forum.ansible.com/t/importerror-cannot-import-name-callbacks/27453>\
**Category:** Ansible Project\
**Created:** [May 4, 2018, 9:32am UTC](https://forum.ansible.com/t/importerror-cannot-import-name-callbacks/27453 "2018-05-04T09:32:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_pandey](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@niraj\_pandey](https://forum.ansible.com/u/niraj_pandey)\
**Post date:** [May 4, 2018, 9:32am UTC](https://forum.ansible.com/t/importerror-cannot-import-name-callbacks/27453/1 "2018-05-04T09:32:25Z")

</div>

I am getting the following error while using ansible module in my python script.

Traceback (most recent call last):  
File “./ansible\_playbook.py”, line 2, in   
from ansible import playbook, callbacks  
ImportError: cannot import name callbacks

Python version: 2.7.10

Ansible module version 2.5.2 ([https://files.pythonhosted.org/packages/d8/5f/3e7d8243159ba831942b851891d8eeac04615323a91e8447365aa7311299/ansible-2.5.2.tar.gz](https://files.pythonhosted.org/packages/d8/5f/3e7d8243159ba831942b851891d8eeac04615323a91e8447365aa7311299/ansible-2.5.2.tar.gz))

Thanks  
Niraj
