azure - 在 azure 中创建 webjob 时出现 python 包安装错误
问题描述
我正在创建一个 webjob,它具有以下 python 依赖项(azure-storage-blob==12.8.1,azure)以及其他依赖项,问题在于我的代码仅在 3-4 小时后就卡在了下面。
Dowenloading azure_common-1.1.8-py2.py3-none-any.whl(7.9kb)
pip is looking at multiple versions of azure-core to determine which version is compatible
with other requirements. This could take a while.
[08/12/2021 19:55:54 > d827c9: INFO] INFO: This is taking longer than usual. You might need to
provide the dependency resolver with stricter constraints to reduce runtime. If you want to
abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what
happened here: https://pip.pypa.io/surveys/backtracking
问题是,如果我安装了特定版本的 azure,那么它与 azure-storage-blob 不兼容,并且在导入 blob 存储时抛出错误,如果 f 没有安装 azure 或其他与 azure-storage-blob 不兼容的 azure 版本==12.8.1 并抛出以下错误:
from azure.keyvault import KeyVaultAuthentication, KeyVaultClient
ImportError: cannot import name 'KeyVaultAuthentication'
有谁知道如何在创建 azure webjob 时安装 python 包以及解决此问题的解决方案
我还有另一个与触发的 webjob 相关的问题,所以假设如果我成功安装了软件包,那么每次运行它是否会安装所有软件包,或者它只会在第一次点击并保存在 env 中的软件包时
解决方案
通过运行检查依赖树在本地的样子pip freeze
,然后提供严格的版本以防止依赖解析超时。
推荐阅读
- sql - 一个带有两个外键的 sql 语句
- android - Android-Work Manager OnetimeWorkRequest 不工作(Android-Jetpack)
- javascript - 运行“开发”时出错:java.util.concurrent.ExecutionException:com.intellij.execution.ExecutionException:未指定可执行文件
- javascript - 现有站点上的 Vue.js 问题
- java - 第二个活动的 TextView 中的文本超出了屏幕范围,但适用于更大的显示手机
- java - 这个“E”部分在CBC模式下做什么?
- git - Git跳过用户名提示
- javascript - 在使用 useEffect 和 unsubscribe 时,它会在函数警告中给出 Missing 返回类型
- swift - TitleView 程序恢复后消失
- ruby-on-rails - Watir 返回不正确的子表