【问题标题】:azure web app service (PYTHON) failed as pip failed for azure-iothub-device-clientazure Web 应用程序服务 (PYTHON) 失败,因为 azure-iothub-device-client 的 pip 失败
【发布时间】:2018-10-17 04:34:26
【问题描述】:

azure-iothub-device-client==1.3.2 的 pip 安装要求失败

我尝试将 myPython 网络应用程序 git 到 AZURE WEB 应用程序。我的网络应用程序在本地运行完美。当我将代码推送到 azure web 应用程序时,在执行 pip 安装要求时会引发错误

PS C:\Users\hackuser1\Desktop\Madhu\tryPythonWeb\python-docs-hello-world> git push azure master
计数对象:3,完成。
压缩对象:100% (3/3),完成。
写入对象:100% (3/3),324 字节 | 108.00 KiB/s,完成。
总共 3 个(增量 1),重复使用 0 个(增量 0)
远程:更新分支'master'。
remote:更新子模块。
远程:为提交 id '4bce78d374' 准备部署。
remote:生成部署脚本。
远程:正在运行部署命令...
远程:处理python部署。
远程:KuduSync.NET 从:'D:\home\site\repository' 到:'D:\home\site\wwwroot'
远程:复制文件:'requirements.txt'
远程:检测到 requirements.txt。您可以使用 .skipPythonDeployment 文件跳过 Python 特定的步骤。
远程:从站点配置中检测 Python 运行时
远程:检测到python-2.7
remote:找到兼容的虚拟环境。
远程:Pip 安装要求。
远程:下载/解压缩 azure-iothub-device-client==1.3.2(来自 -r requirements.txt(第 1 行))
远程:找不到任何满足要求 azure-iothub-device-client==1.3.2 的下载(来自 -r requirements.txt(第 1 行))
遥控器:清理...
远程:根本找不到 azure-iothub-device-client==1.3.2 的发行版(来自 -r requirements.txt(第 1 行))
远程:在 D:\home\pip\pip.log 中存储失败的调试日志
remote:网站部署过程中发生错误。
远程:
远程:错误 - 更改已提交到远程存储库,但部署到网站失败。

以下是需求文件中的数据

azure-iothub-device-client==1.3.2
azure-iothub-service-client==1.3.2
烧瓶==1.0.2
烧瓶-Sijax==0.4.1

【问题讨论】:

    标签: python azure azure-web-app-service


    【解决方案1】:

    Function 上预装的“pip”的当前版本太旧,不知道如何安装轮子,并且您需要轮子,因为该轮子包含 C 扩展。另见:Azure functions: Installing Python modules and extensions on consumption plan

    另外,如果您想使用 git 进行部署,您可能需要安装自己的 Python,本教程可以提供一些想法: https://github.com/Azure-Samples/app-service-msi-keyvault-python#installation-on-azure

    【讨论】:

      猜你喜欢
      • 2021-12-06
      • 1970-01-01
      • 2014-01-09
      • 2020-01-19
      • 1970-01-01
      • 2020-08-20
      • 2019-03-17
      • 2022-12-13
      • 1970-01-01
      相关资源
      最近更新 更多