[Python] Python azure sdk - Exception has occurred: ModuleNotFoundError No module named...

Discussão em 'Python' iniciado por Stack, Março 18, 2025.

  1. Stack

    Stack Membro Participativo

    • Package: azure-servicebus:
    • Package version: 7.8.0:
    • OS: WSL 2:
    • Python version: 3.8.10:

    Describe the bug Unable to import ServiceBusClient from azure-servicebus.

    To Reproduce Steps to reproduce the behavior:

    1. pip install azure-servicebus
    2. from azure.servicebus import ServiceBusClient

    My requirements.txt following a pip freeze:

    azure-common==1.1.28
    azure-core==1.26.0
    azure-nspkg==3.0.2
    azure-servicebus==7.8.0
    black==22.8.0
    certifi==2022.9.24
    charset-normalizer==2.1.1
    click==8.1.3
    idna==3.4
    importlib-metadata==5.0.0
    isodate==0.6.1
    itsdangerous==2.1.2
    Jinja2==3.1.2
    MarkupSafe==2.1.1
    msrest==0.7.1
    mypy-extensions==0.4.3
    numpy==1.23.3
    oauthlib==3.2.1
    pathspec==0.10.1
    platformdirs==2.5.2
    python-dateutil==2.8.2
    pytz==2022.4
    requests==2.28.1
    requests-oauthlib==1.3.1
    six==1.16.0
    tomli==2.0.1
    typing-extensions==4.3.0
    uamqp==1.6.0
    urllib3==1.26.12
    Werkzeug==2.2.2
    zipp==3.8.1


    Output of pip show azure-servicebus:

    Name: azure-servicebus
    Version: 7.8.0
    Summary: Microsoft Azure Service Bus Client Library for Python
    Home-page: https://github.com/Azure/azure-sdk-for-python
    Author: Microsoft Corporation
    Author-email: azpysdkhelp@microsoft.com
    License: MIT License
    Location: /home/neo/neo-betalab/uni/event-receiver/venv/lib/python3.8/site-packages
    Requires: six, azure-core, isodate, msrest, uamqp, typing-extensions, azure-common
    Required-by:


    Is this a version compatibility issue?

    Continue reading...

Compartilhe esta Página