DX NetOps upgrade automation preflight failing with errors /usr/bin/python: No such file or directory
search cancel

DX NetOps upgrade automation preflight failing with errors /usr/bin/python: No such file or directory

book

Article ID: 406034

calendar_today

Updated On:

Products

Network Observability

Issue/Introduction

fatal: [hostname]: FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "module_stderr": "Shared connection to hostname closed.\n",
    "module_stdout": "/$PMINSTALLDIR/PerformanceCenter\n/bin/sh: /usr/bin/python: No such file or directory\n",
    "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error",
    "rc": 127

Resolution

In this case it was caused by a custom command in the .bashrc profile.

Remove any custom commands and retest the upgrade automation preflight check. 

Also confirm that the python version is 3.12.

Python 3.12 is needed.
 

Users need to ensure python3.12 or greater with the ssl module is installed on all hostnames that are specified in the inventory.remote file.

Users then need to select this version using the below command:

update-alternatives --config python

If users do not want use update-alternatives, the other option is to set the correct path for the below variable in the ansible.cfg file

interpreter_python=/usr/bin/python3.12