# dockers module issues

**URL:** <https://forum.ansible.com/t/dockers-module-issues/24257>\
**Category:** Ansible Project\
**Created:** [April 19, 2017, 11:32pm UTC](https://forum.ansible.com/t/dockers-module-issues/24257 "2017-04-19T23:32:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Muriithi](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@William\_Muriithi](https://forum.ansible.com/u/William_Muriithi)\
**Post date:** [April 19, 2017, 11:32pm UTC](https://forum.ansible.com/t/dockers-module-issues/24257/1 "2017-04-19T23:32:11Z")

</div>

Hello,

Would really appreciate pointer here as I have run to a hard wall. I am trying to use ansible to manage and configure docker. So I started on a google search and noticed ansible already has some support for dockers.

However, I don’t seem to get past that. Since I added that task sometime at 12 PM today, I have been having this error;

fatal: [[fluorine.eng.example.com](http://fluorine.eng.example.com)]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`”}

Docker-py is however already installed. Anybody using this module who have a pointer? Would really be grateful for any help.

william@cacti ~]$ ansible --version  
/usr/lib64/python2.6/site-packages/cryptography/ **init**.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6  
DeprecationWarning  
ansible 2.2.2.0  
config file = /etc/ansible/ansible.cfg  
configured module search path = Default w/o overrides  
[william@cacti ~]$

[william@cacti ~]$ cat /etc/redhat-release  
CentOS release 6.8 (Final)  
[william@cacti ~]$

[william@cacti ~]$ sudo pip install docker-py  
[sudo] password for william:  
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6  
Requirement already satisfied: docker-py in /usr/lib/python2.6/site-packages  
Requirement already satisfied: websocket-client\>=0.32.0 in /usr/lib/python2.6/site-packages (from docker-py)  
Requirement already satisfied: backports.ssl-match-hostname\>=3.5; python\_version \< “3.5” in /usr/lib/python2.6/site-packages (from docker-py)  
Requirement already satisfied: ipaddress\>=1.0.16; python\_version \< “3.3” in /usr/lib/python2.6/site-packages (from docker-py)  
Requirement already satisfied: six\>=1.4.0 in /usr/lib/python2.6/site-packages (from docker-py)  
Requirement already satisfied: requests!=2.11.0,\>=2.5.2 in /usr/lib/python2.6/site-packages (from docker-py)  
Requirement already satisfied: docker-pycreds\>=0.2.1 in /usr/lib/python2.6/site-packages (from docker-py)  
Requirement already satisfied: argparse in /usr/lib/python2.6/site-packages (from websocket-client\>=0.32.0-\>docker-py)

Regards,  
William

---

<div class="post-metadata">

**Author:** ![Sander\_Smeenk](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Sander\_Smeenk](https://forum.ansible.com/u/Sander_Smeenk)\
**Post date:** [April 20, 2017, 8:41am UTC](https://forum.ansible.com/t/dockers-module-issues/24257/2 "2017-04-20T08:41:50Z")

</div>

Quoting William Muriithi (william.muriithi@gmail.com):

> fatal: [fluorine.eng.example.com]: FAILED! =\> {"changed": false, "failed":  
> true, "msg": "Failed to import docker-py - No module named  
> requests.exceptions. Try `pip install docker-py`"}
> 
> Docker-py is however already installed.

[..]

> [william@cacti ~]$ sudo pip install docker-py  
> Requirement already satisfied: docker-py

The docker-py package is needed on the host that is actually running the  
task: fluorine.eng.example.com. Or you need to 'delegate' the task  
depending on the 'docker-py' package to your localhost: cacti.

HTH,  
-Sndr.
