ModuleNotFoundError: No module named 'azure.storage' when deploying Azure function via ARM template

Swarada Jalukar 0 Reputation points
2024-07-16T19:21:34.3866667+00:00

I am trying to deploy an Azure function using ARM template. I am using 'Microsoft.Web/sites/sourcecontrols' with the properties specifying my RepoURL and BranchName.
My requirements.txt has a list of modules defined. However, when I try to run the function, it throws a ModuleNotFoundError as attached below. How can I install the required modules using ARM template deployment?
Can someone help me regarding this?

Exception while executing function: Functions.MyTriggerFunc Result: Failure
Exception: ModuleNotFoundError: No module named 'azure.storage'. Cannot find module. Please check the requirements.txt file for the missing module. For more info, please refer the troubleshooting guide: https://aka.ms/functions-modulenotfound. Current sys.path: ['/home/site/wwwroot', '/home/site/wwwroot/.python_packages/lib/site-packages', '/azure-functions-host/workers/python/3.11/LINUX/X64', '/usr/local/lib/python311.zip', '/usr/local/lib/python3.11', '/usr/local/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/site-packages']
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,953 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.