Python version mismatch, Azure Web App(Linux) selected 3.8 but via ssh still appears as 2.7

Shamith Lokuge 21 Reputation points
2021-07-10T06:22:07.07+00:00

I have created a web app(Linux) on Microsoft Azure and choose Python 3.8 as the configuration. Then I set up a deployment pipeline on Azure DevOps which deploys a django app into the web app(Linux). The deployment itself also runs fine, artifacts are copied and unzipped. But some errors are in the deployment. So when I SSH into the app and execute the python --version, it appeared as Python 2.7.13 instead of 3.8. Does anyone know how to update to 3.8? O else why is this behavior? How to come out of it?

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

Accepted answer
  1. Manu Philip 17,671 Reputation points MVP
    2021-07-10T16:29:20.573+00:00

    When creating the App Services on Azure Portal, specifying Runtime Stack as Python 3.8 will not automatically install Python 3.8 and set it as the default for your App Services on the server. You need to manually set up the version on for your App Services on Azure Portal.

    Refer the following page to set it manually
    managing-python-on-azure-app-service

    0 comments No comments

0 additional answers

Sort by: Most helpful