Skip to content

Instantly share code, notes, and snippets.

@taragurung
Last active November 25, 2018 05:48
Show Gist options
  • Save taragurung/836a76cff88c6e5a5abe08a3458d5210 to your computer and use it in GitHub Desktop.
Save taragurung/836a76cff88c6e5a5abe08a3458d5210 to your computer and use it in GitHub Desktop.
Failed to import docker-py - No module named ordered_dict. Try `pip install docker-py`
The problem occurs when trying to run docker containers using the ansible docker module as below:
########
playbook:
########
- name: Start docker container (using docker-compose)
docker_service:
project_src: /home/ubuntu
become_user: ubuntu
tags:
- docker-compose
-------------------------------
The following solved the issue:
-------------------------------
pip uninstall docker
pip install --ignore-installed docker-py
Reference:
https://github.com/ansible/ansible/issues/20492
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment