AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  Ansible: Could not import the dnf python module using /usr/bin/python3.9

    Posted 2 days ago

    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
    ------------------------------


  • 2.  RE: Ansible: Could not import the dnf python module using /usr/bin/python3.9

    Posted 2 days ago

    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
    ------------------------------



  • 3.  RE: Ansible: Could not import the dnf python module using /usr/bin/python3.9

    Posted 2 days ago

    Hi,
    How would one point it to use that version of python



    ------------------------------
    Paul Clayton
    ------------------------------



  • 4.  RE: Ansible: Could not import the dnf python module using /usr/bin/python3.9

    Posted 2 days ago

    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
    ------------------------------



  • 5.  RE: Ansible: Could not import the dnf python module using /usr/bin/python3.9

    Posted 2 days ago

    Hi,

    Thanx all working now.



    ------------------------------
    Paul Clayton
    ------------------------------