【发布时间】:2021-09-01 06:11:19
【问题描述】:
尝试使用https://docs.microsoft.com/en-us/azure/azure-functions/create-first-function-cli-python?tabs=azure-cli%2Cbash%2Cbrowser#create-supporting-azure-resources-for-your-function 上的教程部署 Azure 函数,但我无法通过 functionapp create 创建 Python 函数应用。我正在使用 Python 3.7.8,该函数的名称是挑战,我计划部署到 Azure,在那里我已经有一个运行的站点主要是 C#。我在命令行中这样调用它:
az functionapp create --consumption-plan-location westus --runtime python --runtime-version 3.7 --functions-version 3 --name challenge --os-type windows
我得到这个错误:
usage error: Currently supported runtimes (--runtime) in windows function apps are: dotnet-isolated, dotnet, node, custom, java, powershell.
根据az function app create 文档python 应该可以工作。
我绝望地尝试了这个:
az functionapp create --consumption-plan-location westus --runtime dotnet --functions-version 3 --name challenge --os-type windows
这产生了错误消息Operation returned an invalid status 'Conflict'。
如何在 Azure 上部署 Python 函数应用?
【问题讨论】: