【问题标题】:Not able to create a python function in azure无法在 azure 中创建 python 函数
【发布时间】:2019-06-26 13:45:44
【问题描述】:

我无法在 python 中创建可用于在 PowerApps 上运行 python 脚本的 azure 函数。

我已经在命令提示符和创建应用程序的 Visual Studio 上进行了尝试,但我无法部署它。

Is it possible to automate the execution of a Python script using Microsoft Flow? 我正在使用此链接创建 azure 函数

(.env) C:\Users\PAhire2\MyFunctionProj>az functionapp create --resource-group myResourceGroup --os-type Windows --consumption-plan-location westeurope --runtime python --name NewApp --storage-account 1234store
usage error: Currently supported runtimes (--runtime) in windows function apps are: dotnet, node, java, powershell.

这是我收到的错误消息

【问题讨论】:

    标签: azure azure-functions


    【解决方案1】:

    你得到这个错误是因为 python 函数只能在 Azure 上的 Linux 操作系统上创建,所以只需将你的 os-type 更改为 Linux,它就会成功。

    az functionapp create --resource-group mygroup --os-type Linux --consumption-plan-location westeurope --runtime python --name pythonfunctiontest --storage-account mystorageaccount
    

    我使用 Azure Cloud Shell 进行了测试,并且可以正常工作。希望这可以帮助你。也可以参考教程:Create a function app in Azure.

    【讨论】:

      猜你喜欢
      • 2019-09-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-24
      • 2020-07-05
      • 2012-07-30
      相关资源
      最近更新 更多