[英]Python azure sdk - Exception has occurred: ModuleNotFoundError No module named 'azure.servicebus'
Describe the bug Unable to import ServiceBusClient from azure-servicebus.描述 Unable to import ServiceBusClient from azure-servicebus 的错误。
To Reproduce Steps to reproduce the behavior:重现重现行为的步骤:
My requirements.txt following a pip freeze: pip 冻结后我的 requirements.txt:
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: pip 的 Output 显示 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?这是版本兼容性问题吗?
In case anyone happens to be as naive as me:万一有人碰巧像我一样天真:
I had a local module named azure and this was causing conflict issues when trying to import azure.servicebus.我有一个名为 azure 的本地模块,这在尝试导入 azure.servicebus 时导致了冲突问题。 I've renamed my personal azure module and everything is working fine now.我已经重命名了我的个人 azure 模块,现在一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.