skip to Main Content

We have the azure-management library defined in the requirements.txt:

azure-mgmt-eventhub==11.0.0

But when trying to import the library it is not found:

enter image description here

This has been intermittent for other developers – but it is persistent for the clusters I have worked with. Restarting the sesion or the cluster or reattaching the wheel (or even an updated one) has not changed this behavior.

What might be going on here?

2

Answers


  1. Chosen as BEST ANSWER

    The issue was that the requirements.txt file attached to the Synapse Spark Pool had not been updated. So the azure-mgmt-eventhub-11.0.0 library was in the source code / ADO file but was not in the file used to set up the Spark Pool.

    Note that the date listed on the file was v recent (yesterday). I'm not sure what that date refers to since the actual contents were from a version six weeks old.


  2. As per the Microsoft Azure SDK for Python, you can install the Microsoft Azure Event Hub Management Client Library using the command pip install azure-mgmt-eventhub.

    As you mentioned, you are using the requirements.txt file. I have tried the following approach:

    Step 1:

    I created a requirements.txt file containing azure-mgmt-eventhub==11.0.0.

    Step 2:

    I uploaded it to the Spark pool.

    enter image description here

    Step 3:

    Next, after uploading, I tried:

    from azure.mgmt.eventhub import EventHubManagementClient
    

    Results:

    import pkg_resources
    for d in pkg_resources.working_set:
         print(d)
    

    enter image description here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search