简体   繁体   English

Azure webapp:如何更新Python版本?

[英]Azure webapp: How to update Python version?

I'm using the Azure webapp service, in a Linux environment, with a Node stack, since this is what my webapp primarily runs off.我在 Linux 环境中使用 Azure webapp 服务,使用节点堆栈,因为这是我的 webapp 主要运行的地方。 My node webapp does however execute a Python script, that uses modules which require Python version 3.6 or greater, but the webapp currently has Python version 3.5.但是,我的节点 webapp 执行 Python 脚本,该脚本使用需要 Python 版本 3.6 或更高版本的模块,但 webapp 当前具有 Python 版本 3.5。

My question is, how can I update/upgrade my Python version to 3.6 or greater, either through the Azure control panel, or the Azure CLI.我的问题是,如何通过 Azure 控制面板或 Azure CLI 将我的 Python 版本更新/升级到 3.6 或更高版本。 I would have tried using the extensions tab through the Azure control panel, but it seems to be inaccessible (greyed out), and I cannot interact with it.我会尝试通过 Azure 控制面板使用扩展选项卡,但它似乎无法访问(灰色),我无法与之交互。

If you need anymore information, please do ask.如果您需要更多信息,请询问。

Thanks in advance!提前致谢!

To change the versions in Azure web app service更改 Azure web 应用服务中的版本

  • Site extensions, which allow you to add features to your site, are supported by Azure App Service. Azure App Service 支持站点扩展,允许您向站点添加功能。
  • These can be installed as part of an ARM template, over a REST API, or through the portal directly.这些可以作为 ARM 模板的一部分、通过 REST API 或直接通过门户安装。
  • It is easier to install through the gateway if your site is already up and running.如果您的站点已经启动并正在运行,则通过网关进行安装会更容易。
  • In Azure Portal =>Your App Service => Under Development Tools => Select Extensions, and then click on Add from the App Service blade.在 Azure 门户 => 你的应用服务 => 在开发工具下 => Select 扩展,然后从应用服务边栏选项卡中单击添加。

在此处输入图像描述

  • Scroll down the list of extensions until you see the Python logos, then select the version you require.向下滚动扩展列表,直到您看到 Python 徽标,然后是 select 您需要的版本。

  • We can see the "OK" button greyed out.我们可以看到“确定”按钮变灰了。

在此处输入图像描述

  • Click on the Accept legal terms button and click on "ok"单击接受法律条款按钮,然后单击“确定”

在此处输入图像描述

在此处输入图像描述

  • Then you can see the ok button is accessible然后就可以看到ok按钮可以访问了

Update更新

To Change the version in Azure Linux Web App更改Azure Linux Web App中的版本

I have changed the python version in Azure Linux Web App service in using Powershell Command我在Azure Linux Web App service中使用Powershell命令更改了python版本

To get the current version,要获取当前版本,

az webapp config show --resource-group <resource-group-name> --name <app-name> --query linuxFxVersion

To update the existing version,要更新现有版本,

az webapp config set --resource-group <resource-group-name> --name <app-name> --linux-fx-version "PYTHON|3.6"

在此处输入图像描述

  • In Portal =>Your Web App => Configuration=> General Settings You can see the updated version of python在Portal =>Your Web App => Configuration=> General Settings 可以看到python的更新版本

在此处输入图像描述

  • The version which you are using python 3.6 is deprecated.您使用的版本 python 3.6 已弃用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何以及在何处存储来自部署在 Azure webapp 中的 MVC 应用程序的文件 - How and where to store a file from MVC application that is deployed in Azure webapp 允许 Azure 服务到 webapp? - Allow Azure services to webapp? 如何升级Azure Data Explorer Python Plugin Sandbox Anaconda和Python版本? - How to Upgrade Azure Data Explorer Python Plugin Sandbox Anaconda and Python Version? Docker 卷行为与 azure webapp - Docker volumes behavior with azure webapp 我可以在 Azure AKS 集群中更新 NGINX 版本吗? - Can I update NGINX version in Azure AKS Cluster? 如何使用 azure python sdk 版本 2 将 X.509 认证的下游设备连接到启用边缘的网关 azure - How to connect X.509 authenticated downstream device using azure python sdk version 2 to azure edge enabled gateway 如何更新 firebase 版本 9 中的信息 - how to update info in firebase version 9 如何用较新的API版本识别Azure资源 - How to identify Azure resources with a newer API version Azure资源如何获取最新的API版本 - How to get the newest API version of Azure Resources Azure Webapp 克隆 powershell 脚本不工作 - Azure Webapp Clone powershell script is not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM