Azure / WALinuxAgent

Microsoft Azure Linux Guest Agent
http://azure.microsoft.com/
Apache License 2.0
541 stars 372 forks source link

[BUG] the walinuxagent is installed in ubuntu 22.04 and the python version is 3.9.13. the walinuxagent is not work. #3207

Closed DaisenC closed 3 weeks ago

DaisenC commented 1 month ago

I have a ubuntu 22.04 VM in Azure. and my python is 3.9.13. whatever I install the walinuxagent by python3 setup.py or apt -y install walinuxagent, it is not work. error info: NameError: name 'distro' is not defined Snipaste_2024-09-05_17-37-15

how to resolve this problem and make it work. please help me. thx.

nagworld9 commented 1 month ago

you need to install distro module https://github.com/Azure/WALinuxAgent/blob/master/requirements.txt#L1

nagworld9 commented 1 month ago

@DaisenC curious is it marketplace image from azure or different vm? In general marketplace images comes with guest agent and they should have this module

DaisenC commented 1 month ago

it is marketplace image from azure. but the customer install the python3.9.13 by himself. so it display the error. I tried to the way that you offered. but it still didn't work.

nagworld9 commented 1 month ago

maybe this module is not in the new pythonpath. Customers need to debug if they are doing any customization.