How to deploy python function on Azure Fuctions - Linux consumption plan

Rkdm 0 Reputation points
2025-04-16T07:28:37.3266667+00:00

Hello,

I am trying to deploy a Python function on Azure functions using zip package stored in an Azure storage blob.

WEBSITE_RUN_FROM_PACKAGE Is set to the url. It works, I am able to run a simple hello world function.

But when it comes to install additional Python library listed in requirements.txt - the libraries are not installed.

Can you please indicate what is the right procedure or zip file structure or any else required to make it work ?

the specific library I am trying to install is : azure-storage-blob

I already tried to install it manually in the zip with pip install -r requirements.txt — target at zip root but also at the folder .python_packages/lib/site-packages Without success.

Thank you for your support.

Rkdm

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rkdm 0 Reputation points
    2025-04-18T16:02:06.5566667+00:00

    I finally found my issue :

    Everything was set up properly, issue came from the way I generated the zip from Windows os. Windows's Compress-Archive command doesn't respect ZIP standard and backslashes are used instead of forward slashes. Azure function run into a Linux consumption plan, which requires forward slashes. I used 7zip to generate the archive :

    & $7ZipPath a -tzip $ZipName * .python_packages


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.