I have a function app (python) in the azure portal which is in python version 3.7. The FUNCTIONS_EXTENSION_VERSION of the function app is ~3. When I deploy the function python) from VS code to update the function in the portal, I'm able to deploy and the update is reflected in the azure portal.
But when I change the python version to 3.9 and update FUNCTIONS_EXTENSION_VERSION to ~4 in the Azure portal and try to deploy the function(python) from VS code to update the function in the portal, deployment failed with error "deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build."
The deployment is failing only after upgrading to version 3.9.
Could anyone please help me to understand why am I getting this error and how can we fix this?



