# using a custom ansible module from a python package

**URL:** <https://forum.ansible.com/t/using-a-custom-ansible-module-from-a-python-package/24289>\
**Category:** Ansible Project\
**Created:** [April 21, 2017, 10:00pm UTC](https://forum.ansible.com/t/using-a-custom-ansible-module-from-a-python-package/24289 "2017-04-21T22:00:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Lorenzini](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Joseph\_Lorenzini](https://forum.ansible.com/u/Joseph_Lorenzini)\
**Post date:** [April 21, 2017, 10:00pm UTC](https://forum.ansible.com/t/using-a-custom-ansible-module-from-a-python-package/24289/1 "2017-04-21T22:00:48Z")

</div>

Hi all,

Let’s say I create a python package (may have one or more subdirectories with the appropriate **init**.py file). Can I have ansible module in this package and have ansible copy over the entire package and run it? When I try anything like that by putting the package in the library path, I get a module not found. If i put everything in a single file, then it works as expected. I am guessing I’d just have to manually install the python package on the remote server and then run the ansible module from there.

Joe
