Configure Python on Azure App Service

Aleksandra Grązka 1 Reputation point
2022-04-14T18:50:28.507+00:00

I already have a python web application created that runs on App Service (Windows). For technical reasons, I need to change my python version to 3.8.
In the "extensions" section I can choose up to version 3.4.
Does this mean that a higher version is not possible?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,003 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Takahito Iwasa 4,851 Reputation points MVP
    2022-04-14T21:40:20.4+00:00

    Hi, @Aleksandra Grązka

    First, Linux is currently the recommended environment for hosting Python with the App Service.

    Linux is currently the recommended option for running Python apps in App Service.

    https://learn.microsoft.com/en-us/azure/app-service/configure-language-python

    On Windows, it doesn't run as the App Service runtime, but it works with extensions. However, although it can be used as described below, there is also a statement that it will not be updated or provided in the future.

    [! Note] Python support in Azure App Service for Windows has been officially deprecated. As a result, Visual Studio publish commands are officially supported only for IIS targets and no longer officially supported for remote debugging in Azure App Service.
    However, the Python extension for App Service on Windows has not been serviced or updated, but is still available. Therefore, the publishing function to App Service in Windows will work for a while.

    https://github.com/MicrosoftDocs/visualstudio-docs.ja-jp/blob/live/docs/python/publishing-python-web-applications-to-azure-from-visual-studio.md

    As far as I can see in the Azure portal, it was still available up to 3.6.4. You may be able to update up to that point.
    If it doesn't appear in the console, try using Azure Resource Manager to specify the version by following the steps below.

    https://learn.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service?view=vs-2022#choose-a-python-version-through-the-azure-%20resource-manager

    Please also refer to the following thread.
    https://learn.microsoft.com/en-us/answers/questions/24290/flask-web-service-on-windows-platform.html
    I think migrating to Linux is the best if possible.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.