Environmental information. ansible to call the docker module of remote centos7 , you need to install the package docker = = 4.4.4 . "msg": "Failed to import the required Python library (Docker SDK for Python: docker above 5.0.0 (Python >= 3.6) or docker before 5.0.0 (Python 2.7) or docker-py (Python 2.6)) on k8s-node-56-166.by.com's Python /usr/bin/python.
ansible to call the docker module of remote centos7 , you need to install the package docker = = 4.4.4. "msg":"Failed to import the required Python library (Docker SDK for Python: docker above 5.0.0 (Python >= 3.6) or docker before 5.0.0 (Python 2.7) or docker-py (Python 2.6)) on k8s-node-56-166.by.com's Python /usr/bin/python. Please read the ...
20.03.2018 · Uninstall all pip docker and docker-py modules. Make sure ansible is using python3 sudo pip3 install ansible. Install the distribution docker module: apt install python3-docker. Yes, strange but the only combination was: pip3 installed ansible with distribution installed module.
26.12.2018 · fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import docker or docker-py - No module named docker. I was using the following: Ubuntu 20.04 Ansible 2.10.7 Python 3.8.10 pip 20.0.2 (pip3) Here's how I fixed mine: So first I ran the command to remove all existing copies of docker, docker-py and docker-compose python libraries: