1

I'm using the Azure webapp service, in a Linux environment, with a Node stack, since this is what my webapp primarily runs off. 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.

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. 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.

If you need anymore information, please do ask.

Thanks in advance!

Frinkel
  • 59
  • 1
  • 7

1 Answers1

0

To change the versions in Azure web app service

  • Site extensions, which allow you to add features to your site, are supported by Azure App Service.
  • These can be installed as part of an ARM template, over a REST API, or through the portal directly.
  • 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.

enter image description here

  • Scroll down the list of extensions until you see the Python logos, then select the version you require.

  • We can see the "OK" button greyed out.

enter image description here

  • Click on the Accept legal terms button and click on "ok"

enter image description here

enter image description here

  • Then you can see the ok button is accessible

Update

To Change the version in Azure Linux Web App

I have changed the python version in Azure Linux Web App service in using Powershell Command

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"

enter image description here

  • In Portal =>Your Web App => Configuration=> General Settings You can see the updated version of python

enter image description here

  • The version which you are using python 3.6 is deprecated.
Harshitha Veeramalla
  • 1,515
  • 2
  • 10
  • 11
  • As described above, since I'm using a Linux environment, I cannot access the extensions tab. Is there a way to update the Linux Python version? – Frinkel Mar 15 '22 at 08:15
  • @Frinkel - Please check for the update in the above solution,Provided the Powershell command to update the version – Harshitha Veeramalla Mar 15 '22 at 10:33
  • Yes this is indeed how you would go about changing the stack to be Python 3.6, however my issue persists, since I need the stack to be Node, and therefor only update the underlaying python version. Note - the version for Python can be greater than 3.6, 3.6 is just the minimum requirement. – Frinkel Mar 15 '22 at 11:32
  • @Frinkel, do let me know if the information provided helped you in solving your problem ? – Harshitha Veeramalla Mar 30 '22 at 03:38
  • @HarshithaVeeramalla-MT I am trying to update the Python version at my Azure App service Linus environment to 3.10. I followed your instructions above, but cannot get 3.10, because the server only supports up to 3.9. I saw another post https://stackoverflow.com/questions/72117202/azure-text-to-speech-error-0x38-spxerr-audio-sys-library-not-found-when-deplo talking about how you can upload your own Python package to the server. But that post is about using Windows environment. Do you by anychance know how to upload Python package to a Linux environment? Thanks. – Rui May 05 '22 at 15:07