skip to Main Content

Based on alert message "Azure Functions support for Python 3.6 is ending on 30 September 2022" we tried to follow steps in Azure documentation to upgrade to Python version in existing Azure function. Using Azure CLI to learn the current version, we got an empty string ("linuxFxVersion": ""). Using the command to update the version to 3.9 caused the function to stop working. Fortunately, it worked when the version was set back to 3.6 with the same command.

I could delete the Azure function and all related resources (storage account, application insights) and create it all again but that would mean substantional additional configuration (e.g. for logging). What is the correct approach to change the version?

az account set --subscription <subscription-id>
az functionapp config show --name <resource-name> --resource-group <resource-group-id>
az functionapp config set --name <resource-name> --resource-group <resource-group-id> --linux-fx-version 'python|3.9'

2

Answers


  1. Chosen as BEST ANSWER

    The issue was not the commands to change Python version. I had old versions of packages in my requirements that were not compatible with Python 3.9. When I updated the version of python to 'PYTHON|3.9' and re-deployed the function with most recent package versions in requirements, the function works as expected.


  2. the commands you provide are the correct one to upadte the python version as explained here: Changing Python version

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search