# ModuleNotFoundError: No module named 'ansible.parsing'

**URL:** <https://forum.ansible.com/t/modulenotfounderror-no-module-named-ansible-parsing/29542>\
**Category:** Ansible Project\
**Created:** [January 28, 2019, 8:10am UTC](https://forum.ansible.com/t/modulenotfounderror-no-module-named-ansible-parsing/29542 "2019-01-28T08:10:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shenhaowee](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@shenhaowee](https://forum.ansible.com/u/shenhaowee)\
**Post date:** [January 28, 2019, 8:10am UTC](https://forum.ansible.com/t/modulenotfounderror-no-module-named-ansible-parsing/29542/1 "2019-01-28T08:10:51Z")

</div>

From what I saw in my environment I got this error when the script wasn’t in my root directory.

```auto
[root@xxx API]# ./my_ansible.py 
Traceback (most recent call last):   
     File "./my_ansible.py", line 5, in <module>
        from ansible.parsing.dataloader import DataLoader   
     File "/home/xxx/projects/API/ansible.py", line 5, in <module>
ImportError: No module named parsing.dataloader

```

Once I moved it to /root - it ran fine:

```auto
[root@xxx ~]# ./my_ansible.py
[root@xxx ~]#

```
