0
votes

Good morning, I'm trying to build and deploy an azure functions python in linux with python 3.7, following the steps in https://docs.microsoft.com/en-us/azure/azure-functions/functions-how-to-azure-devops?tabs=python and I get the following error: ModuleNotFoundError: No module named 'azure.cosmosdb', I am using an App Service Plan Basic. I tried this same azure function with consumption and it works correctly for me I need to install wkhtmltopdf with which consumption does not work for me, when creating the azure function with App Service Plan Basic it does not get the module and all the functions and environment are created.

I have tried to do the manual deploy via visual studio code and via azure devops and I get the same result from modulenotfound.

1
I found some similar issues, link1 and link2 you could check if it can give you some help, If the issue still occurs, could you please share the detail log in the issue description?Vito Liu
Hi Wallys, could you please share the latest debug log here?Vito Liu

1 Answers

0
votes

The solution is add the modules that required to requirements.txt.

(Python azure function is based on this file to install module. pip or other method will not work. When you deploy, the tools will pack all modules by requirements.txt.)

Your requirements.txt should be like this:

azure-functions
azure.cosmosdb=xx.xx