After uninstall via "pip uninstall docker" and then use "pip install docker --upgrade" , if that also didnt work - u need to un-install docker-compose as well "pip uninstall docker-compose" , it should work then
This issue happened to me last week in production On Wed, Oct 2, 2019 at 7:20 PM Alfredo De Luca <[email protected]> wrote: > Hi Ravi. I ve done that but didn't work. > > It seems to have problem finding the package pip rather than the docker > library itself. > > > > > > On Wed, Oct 2, 2019 at 11:59 AM Ravi Ranjan <[email protected]> > wrote: > >> Hi Luca , >> >> I have observed the same for our GCP instances where i am running docker >> on VM . Then, i had to uninstall via "pip uninstall docker" and then >> re-install it - "pip install docker" . Issues get resolved . >> >> Ravi Ranjan >> >> On Wed, Oct 2, 2019 at 2:06 PM Alfredo De Luca <[email protected]> >> wrote: >> >>> Hi all. >>> I have the following... >>> >>> - name: Install pip >>> package: >>> name: python-pip >>> update_cache: true >>> state: present >>> >>> - name: Install docker libs with pip >>> pip: >>> name: docker >>> state: present >>> executable: pip >>> >>> When I run the playbook the first time it fails with >>> <SNIP> >>> >>> *FAILED! => {"changed": false, "msg": "Failed to import the required >>> Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py >>> (Python 2.6)) on myhost 's Python /usr/bin/python3. Please read module >>> documentation and install in the appropriate location, for example via `pip >>> install docker` or `pip install docker-py` (Python 2.6). The error was: No >>> module named 'docker'"}* >>> <SNIP> >>> >>> But if ti runs the second time no issue at all. >>> Any idea why? I thought it was cause it can't find the path for PIP >>> ..... but not sure. >>> Cheers >>> >>> -- >>> *Alfredo* >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/CAAWpFTFQcY0wCk64yQ30g5gG-0njYy12NDi5OeC60dsr%2BGHYjg%40mail.gmail.com >>> <https://groups.google.com/d/msgid/ansible-project/CAAWpFTFQcY0wCk64yQ30g5gG-0njYy12NDi5OeC60dsr%2BGHYjg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/CAGfYbJzYXPTS3dNdVtP45Bwa5rDC5%2B4Wb7tM30i2wjZsv6c-4A%40mail.gmail.com >> <https://groups.google.com/d/msgid/ansible-project/CAGfYbJzYXPTS3dNdVtP45Bwa5rDC5%2B4Wb7tM30i2wjZsv6c-4A%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > *Alfredo* > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CAAWpFTFxfkRb%2B-nz8_6FM38j%2B4-emYEQMmWg_s6M-epUwXgG%3Dw%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAAWpFTFxfkRb%2B-nz8_6FM38j%2B4-emYEQMmWg_s6M-epUwXgG%3Dw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAGfYbJxqw%2BsyGRpKGMAoSSH88h%3DHwuFA2eq3QrRVJe%2BnpSMkfw%40mail.gmail.com.
