https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks
------------------------------
Ayappan P
------------------------------
Original Message:
Sent: Wed July 16, 2025 07:04 AM
From: Paul Clayton
Subject: Ansible: Could not import the dnf python module using /usr/bin/python3.9
Hi,
How would one point it to use that version of python
------------------------------
Paul Clayton
Original Message:
Sent: Wed July 16, 2025 06:55 AM
From: Ayappan P
Subject: Ansible: Could not import the dnf python module using /usr/bin/python3.9
You won't be able to use dnf python module using /usr/bin/python3.9 (AIX base provided python3.9). You can do it using "/opt/freeware/bin/python3.9"
------------------------------
Ayappan P
Original Message:
Sent: Wed July 16, 2025 06:44 AM
From: Paul Clayton
Subject: Ansible: Could not import the dnf python module using /usr/bin/python3.9
Hi,
When deploying packages via Ansible, I get the following error. This happens on AIX 7.2 & 7.3
fatal: [myhost]: FAILED! => {"changed": false, "msg": "Could not import the dnf python module using /usr/bin/python3.9 (3.9.19 (main, Jul 30 2024, 07:16:53) [IBM XL C/C++ for AIX 16.1.0.14]). Please install `python3-dnf` or `python2-dnf` package or ensure you have specified the correct ansible_python_interpreter. (attempted ['/usr/libexec/platform-python', '/usr/bin/python3', '/usr/bin/python2', '/usr/bin/python'])", "results": []}
------------------------------
Paul Clayton
------------------------------
#AIXOpenSource