Hi,
in the shim.sh of azure monitor agent you are making the following assumptions:
|
if command -v python3 >/dev/null 2>&1 ; then |
|
eval ${python_exec_command}="python3" |
|
elif command -v python2 >/dev/null 2>&1 ; then |
|
eval ${python_exec_command}="python2" |
|
elif command -v /usr/libexec/platform-python >/dev/null 2>&1 ; then |
|
# If a user-installed python isn't available, check for a platform-python. This is typically only used in RHEL 8.0. |
|
echo "User-installed python not found. Using /usr/libexec/platform-python as the python interpreter." |
|
eval ${python_exec_command}="/usr/libexec/platform-python" |
|
fi |
about python
You can't do them at least on a RHEL8 python3 is not the python being used to waagent (on which python modules you rely in your code).
I am guessing you need to look at which python is being used by the azure agent and then use the same one.
Hi,
in the shim.sh of azure monitor agent you are making the following assumptions:
azure-linux-extensions/AzureMonitorAgent/shim.sh
Lines 14 to 22 in 3cf888f
about python
You can't do them at least on a RHEL8 python3 is not the python being used to waagent (on which python modules you rely in your code).
I am guessing you need to look at which python is being used by the azure agent and then use the same one.