无法从azure.core.pipeline.transport导入RequestsTransport问题求助
解决ImportError: 无法从
azure.core.pipeline.transport导入RequestsTransport和HttpTransport问题 问题原因
你的环境中azure-storage-queue==12.1.6与azure-core==1.31.0版本不兼容。高版本的azure-core已移除了RequestsTransport和HttpTransport类,而旧版azure-storage-queue仍依赖这些被移除的类,导致导入失败。
解决方案
以下两种方案二选一:
方案1:升级azure-storage-queue到兼容版本
将azure-storage-queue升级至与azure-core==1.31.0匹配的版本(比如和azure-storage-blob同版本的12.19.0),执行命令:
pip install --upgrade azure-storage-queue==12.19.0
方案2:降级azure-core到兼容版本
将azure-core降级至适配azure-storage-queue==12.1.6的版本,执行命令:
pip install azure-core==1.26.4
验证
执行上述命令后,重新运行你的代码,导入错误应该会被解决。
内容的提问来源于stack exchange,提问作者Zubaid Ahmed
相关产品推荐
相关产品推荐

