Azure Functions always using Python 3.6

Alexander Kammerer 121 Reputation points
2020-06-23T12:47:08.787+00:00

Hi,

starting today, we are experiencing a strange issue with our Azure Functions configured to run on Python 3.7.

I have a Function App configured to run on a dedicated App Service Plan for Linux. This Function App is configured to run on Python 3.7 (I even checked in the resource configuration). We have deployed our code using the Run From Package method and therefore pre-compile the requirements ourselves with Python 3.7.

For some reason, irregardless of the configured runtime version for the function, our functions will be started using Python 3.6. Whenever I run a function inside my Function App, the actual python code will get executed using Python 3.6. This leads to all kind of issues since we compile our packages using 3.7.

The first step I tried was to use the remote build option to deploy my function. I tried the following:

func azure functionapp publish my-awesome-function --build remote

What then happens is that Oryx will try to build my app but again uses Python 3.6 to do so. It even warns me that I am using an outdated version:

Warning: An outdated version of python was detected (3.6.10). Consider updating.\nVersions supported by Oryx: https://github.com/microsoft/Oryx

What I have also tried was:

  • If I now go to "Configuration" in the Function App blade on the Azure Portal, my Stack Settings (under General settings) are Python and Python 3.7. I'd assume these coincide with the version of Python that the Function App should use.
  • I created a new Function App and specified Python 3.7 as the runtime version during the creation. I had the same problem again.

Is this a problem with the platform right now? Am I doing something wrong?

Thank you for your help

Alexander

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,264 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,876 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Ryan Hill 25,666 Reputation points Microsoft Employee
    2020-07-06T15:02:21.07+00:00

    Apologies to all for this impact.

    I do want all in this thread to know that this issue has been mitigated and a fix is pending rollout. Should be complete by the end of this week. I would suggest in the interim, to those affect, please see @AlexanderKammerer-3296 workaround for setting LinuxFxVersion to python:2.0.13351-python3.7-appservice.

    Regards,
    Ryan

    2 people found this answer helpful.
    0 comments No comments

  2. Alexander Kammerer 121 Reputation points
    2020-06-25T15:25:59.477+00:00

    The problem has gotten even worse to the point that I am no longer able to deploy any Function App running Python on the Consumption Plan. I have just created a completely new Function App and deployed via the function tools from VS Code.

    At the end of the deployment, it will fail to sync triggers, fail to retrieve the remote build status and report a 500 Internal Server Error.

    What happens next is that the Portal bugs completely out. I am no longer able to see any kind of configuration settings for this Function App nor can I access any deployment logs via the SCM site. (This will not load for me.)

    Basic functions of the Azure CLI will fail to work (such as retrieving the configuration for this function app) and tell you that error 500 happened.

    What is going on?


  3. Anonymous
    2020-07-09T14:09:31.957+00:00

    Thanks for the confirmation of this issue. It seems oryx is always using the parameter "--platform-version 3.6"

    0 comments No comments

  4. Tan, Majorvin 1 Reputation point
    2021-09-30T23:28:40.977+00:00

    I have a similar issue where I'm using mcr.microsoft.com/azure-functions/python:3.0-python3.8-appservice but shell says I use 3.6. Based on this github issue, using docker is out of date, so I'm not sure if its deprecated or not working anymore

    https://github.com/MicrosoftDocs/azure-docs/issues/65695

    0 comments No comments