100 Days of Cloud (Azure), Day 46: EventHub to Blob Storage Integration Setup

Task URL: https://engineer.kodekloud.com/task?id=691b19b34aa4b86f475f83a7&status=start

I am getting an error that I am having trouble resolving within the Azure Virtual Machine.

I ran this line:

python3 send_logs.py

I get this error:

Traceback (most recent call last):
  File "/home/azureuser/send_logs.py", line 2, in <module>
    from azure.storage.blob import BlobServiceClient
ModuleNotFoundError: No module named 'azure'

I created the Azure Virtual Machine, following the provided instructions, and with the following settings:

Image
Ubuntu Server 24.04 LTS - Gen2
Size
Standard B1s (1 vcpu, 1 GiB memory)
OS disk type
Standard HDD LRS

I tried installing python3-pip and python3-venv via “sudo apt install”, but I am unable to. I will need to be able to run the following commands, or something similar along the lines of installing the Azure CLI to the VM:

pip install azure-storage-blob
pip install azure-eventhub

Possibly related, but I was able to complete “Day 44: Integrating Azure Event Hub with Virtual Machines”, where send_logs.py is executed on the client host. But when I try to execute send_logs.py on the client host for Day 46, I am getting the following errors:

Traceback (most recent call last):
  File "/root/send_logs.py", line 2, in <module>
    from azure.storage.blob import BlobServiceClient
ModuleNotFoundError: No module named 'azure.storage.blob'

Traceback (most recent call last):
  File "/root/send_logs.py", line 3, in <module>
    from azure.eventhub import EventHubProducerClient, EventData
ModuleNotFoundError: No module named 'azure.eventhub'

Hi @edsfocci

Please refer to the solution here and try again kodekloud-engineer/100_Days_of_Cloud-Azure/Day46.md at main · Srikanth0824/kodekloud-engineer · GitHub

1 Like