# does anyone know this and how to fix, thank you

**URL:** <https://forum.ansible.com/t/does-anyone-know-this-and-how-to-fix-thank-you/34527>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 28, 2021, 5:55pm UTC](https://forum.ansible.com/t/does-anyone-know-this-and-how-to-fix-thank-you/34527 "2021-01-28T17:55:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gun\_Turhal](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@Gun\_Turhal](https://forum.ansible.com/u/Gun_Turhal)\
**Post date:** [January 28, 2021, 5:55pm UTC](https://forum.ansible.com/t/does-anyone-know-this-and-how-to-fix-thank-you/34527/1 "2021-01-28T17:55:32Z")

</div>

TASK [local\_docker : Remove AWX containers before migrating postgres so that the old postgres container does not get used] \*\*\*  
fatal: [localhost]: FAILED! =\> {“changed”: false, “msg”: “Cannot have both the docker-py and docker python modules (old and new version of Docker SDK for Python) installed together as they use the same namespace and cause a corrupt installation. Please uninstall both packages, and re-install only the docker-py or docker python module (for onex’s Python /usr/bin/python3). It is recommended to install the docker module if no support for Python 2.6 is required. Please note that simply uninstalling one of the modules can leave the other module in a broken state.”}  
…ignoring

TASK [local\_docker : Run migrations in task container] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [localhost]: FAILED! =\> {“changed”: true, “cmd”: “docker-compose run --rm --service-ports task awx-manage migrate --no-input”, “delta”: “0:00:00.244683”, “end”: “2021-01-28 18:51:58.782691”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2021-01-28 18:51:58.538008”, “stderr”: “Traceback (most recent call last):\n File "/usr/local/bin/docker-compose", line 8, in \n sys.exit(main())\n File "/usr/local/lib/python3.8/dist-packages/compose/cli/main.py", line 71, in main\n command()\n File "/usr/local/lib/python3.8/dist-packages/compose/cli/main.py", line 124, in perform\_command\n project = project\_from\_options(‘.’, options)\n File "/usr/local/lib/python3.8/dist-packages/compose/cli/command.py", line 33, in project\_from\_options\n return get\_project(\n File "/usr/local/lib/python3.8/dist-packages/compose/cli/command.py", line 121, in get\_project\n client = get\_client(\n File "/usr/local/lib/python3.8/dist-packages/compose/cli/command.py", line 92, in get\_client\n client = docker\_client(\n File "/usr/local/lib/python3.8/dist-packages/compose/cli/docker\_client.py", line 127, in docker\_client\n client = APIClient(\*\*kwargs)\n File "/usr/local/lib/python3.8/dist-packages/docker/api/client.py", line 127, in **init** \n self.\_auth\_configs = auth.load\_config(\nTypeError: load\_config() got an unexpected keyword argument ‘config\_dict’”, “stderr\_lines”: [“Traceback (most recent call last):”, " File "/usr/local/bin/docker-compose", line 8, in “, " sys.exit(main())”, " File "/usr/local/lib/python3.8/dist-packages/compose/cli/main.py", line 71, in main", " command()“, " File "/usr/local/lib/python3.8/dist-packages/compose/cli/main.py", line 124, in perform\_command”, " project = project\_from\_options(‘.’, options)“, " File "/usr/local/lib/python3.8/dist-packages/compose/cli/command.py", line 33, in project\_from\_options”, " return get\_project(“, " File "/usr/local/lib/python3.8/dist-packages/compose/cli/command.py", line 121, in get\_project”, " client = get\_client(“, " File "/usr/local/lib/python3.8/dist-packages/compose/cli/command.py", line 92, in get\_client”, " client = docker\_client(“, " File "/usr/local/lib/python3.8/dist-packages/compose/cli/docker\_client.py", line 127, in docker\_client”, " client = APIClient(\*\*kwargs)“, " File "/usr/local/lib/python3.8/dist-packages/docker/api/client.py", line 127, in **init** ”, " self.\_auth\_configs = auth.load\_config(", “TypeError: load\_config() got an unexpected keyword argument ‘config\_dict’”], “stdout”: “”, “stdout\_lines”: }

---

<div class="post-metadata">

**Author:** ![Garrett\_Kelly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Garrett\_Kelly](https://forum.ansible.com/u/Garrett_Kelly)\
**Post date:** [January 29, 2021, 7:30am UTC](https://forum.ansible.com/t/does-anyone-know-this-and-how-to-fix-thank-you/34527/2 "2021-01-29T07:30:37Z")

</div>

I believe the issue is “Cannot have both the docker-py and docker python modules (old and new version of Docker SDK for Python) installed together”

Run the below commands and you should be good to go:

pip uninstall docker docker-py docker-compose

pip install docker-compose

[https://stackoverflow.com/questions/50151210/unable-to-run-docker-compose-in-an-ansible-playbook](https://stackoverflow.com/questions/50151210/unable-to-run-docker-compose-in-an-ansible-playbook)

---

<div class="post-metadata">

**Author:** ![Garrett\_Kelly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Garrett\_Kelly](https://forum.ansible.com/u/Garrett_Kelly)\
**Post date:** [January 29, 2021, 7:32am UTC](https://forum.ansible.com/t/does-anyone-know-this-and-how-to-fix-thank-you/34527/3 "2021-01-29T07:32:49Z")

</div>

fyi, the AWX requirements for docker-compose were changed back in March 2019.

[https://groups.google.com/g/awx-project/c/Ixk0VUBA5WA/m/nSh0pRhpAQAJ](https://groups.google.com/g/awx-project/c/Ixk0VUBA5WA/m/nSh0pRhpAQAJ)
