Error saying ""msg": "Failed to import docker-py - No module named 'requests.packages.urllib3'. Try `pip install docker-py`""

0 votes

I'm trying to build a docker image using the docker_image module of ansible.

my playbook:

 - name: Install dependent python modules
   pip:
     name: "{{item}}"
     state: present
   with_items:
    - docker-py

 - name: Build container image for api
   docker_image:
      name: api
      path: /home/abc/api/ #location of my Dockerfile

Ans I encountered this error:

"msg": "Failed to import docker-py - No module named 'requests.packages.urllib3'. Try `pip install docker-py`"
Feb 9 in Ansible by Hari
234 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Hari, In addition to docker-py install the following packages:

- requests 
- urllib3
answered Feb 9 by Monish

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,120 points
61 views
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.