gpt4 book ai didi

python - 如何将Azure应用服务Python版本从3.9.7更改为3.9.12?

转载 作者:行者123 更新时间:2023-12-03 06:41:23 27 4
gpt4 key购买 nike

我正在尝试在 Azure 应用服务上部署应用程序。我已使用 Python 3.9.7 创建了部署,但我的应用需要 Python 3.9.12。如何升级python的版本?

在 Azure 应用服务 > 配置 > 常规设置 > Python 次要版本中,没有可用的 3.9.12。所以我必须通过SSH升级它。但是,我不懂Linux。

谁能告诉我使用 bash 将 python 版本升级到 3.9.12 的命令吗?

最佳答案

enter image description here

从 Azure 门户创建版本为 3.9 的 Python Web 应用程序,并在 SSH 控制台中显示为 3.9.7。

在配置中,它仅在次要和主要下拉列表中向我显示了这些版本:

enter image description here

使用这个Azure CLI cmdlet az webapp config set ...,我已将 Python 版本从 3.9.7 设置为 3.9.12 但没有像 SSH 控制台中的 3.9.X 那样具体反射(reflect)。它使用 az webapp config show cmdlet 显示该 Web 应用程序的当前 Python 版本:

az webapp config set --resource-group HariTestRG --name krishpywebapp101 --linux-fx-version "PYTHON|3.9.12"

enter image description here enter image description here

结果:

az webapp config show --resource-group HariTestRG --name krishpywebapp101 --query linuxFxVersion

enter image description here

关于python - 如何将Azure应用服务Python版本从3.9.7更改为3.9.12?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74478132/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com