AWX -Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) Error

Hello Dear All,

I am trying to install AWX to my centos 7 server. When I run the installer, I am receving below error. However, I have docker.

COuld you please help me why I am getting this error?

fatal: [localhost]: 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 centos7’s Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for example via pip install docker or pip install docker-py (Python 2.6). The error was: No module named docker”}

PLAY RECAP ******************************************************************************************************************************************************************************************************************************
localhost : ok=14 changed=2 unreachable=0 failed=1 skipped=95 rescued=0 ignored=0

There are numerous published cocuments on CentOS 7 setups and CentOS 8 setups. Until and unless you use an RPM based installation of AWX, you’ll need to supply your dependences manually before starting.

The directions at https://www.howtoforge.com/tutorial/centos-ansible-awx-installation/ are pretty good, just use “yum” instead of “dnf”, and decide if you want the SCL version of an up-to-date postgrsql or the community postgresql.

Nico Kadel-Garcia

Senior DevOps Engineer

Cengage Learning

200 Pier Four Blvd.

Boston, MA 02210

nico.kadel-garcia@cengage.com