I've been looking into ways to do this and it doesn't appear this is possible in the current version of Ansible.
Honestly, the pull request mentioned by @slackhacker seems to be the cleanest option, but that looks like it may not be available until Ansible 2.1...
Until then...
Deploy your dependencies using ansible
The library you want has to be copied to each system you run on. So, let's just have ansible take care of it for us.
---
tasks:
- name: Copy mylibrary
# Only requirement is that the dst path exists in the default system python path
copy: src=path-to-library dst=/usr/local/lib/python2.7/dist-packages
- name:
mymodule:
arg1: foo
arg2: bar
Download dependencies in your module code
If your module code is accessible to the server you are running on (via HTTP, SSH, etc), you could code the module to go out and grab the dependencies directy in python instead of doing it as a separate task.
This has the added value of not requiring extra steps from the end user, but will probably run slower due to the extra copies having to be made.
Roll your own package
You could also roll your own package using pip
or any other packaging toolchain. This is probably not for the faint of heart.