-1

We are trying to deploy a custom wheel file to our Azure Function App (as it will be deployed in clients env). However, we are facing numerous struggled in this. When we try and build locally using a local wheel file, during the build, it comes up with this error:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/8d9d6b9e1bcac0a******'

We have added a path to our requirements.txt (like here Install local wheel file with requirements.txt)

Could anyone help with how we could proceed with this? Thanks

P.S. We have also tried uploading to an Azure Storage Account File Share but haven't had any luck in that regard either. But if someone knows how to do it via a File Share/Blob then that is equally good!

1 Answers1

2

Adding wheel files in Azure function you must follow the below steps

Add your relative path and package modules in requirement.txt file like

azure-functions
docutils == 0.9.1
Jinja2 ==3.0.3
Pygments == 1.5
Sphinx ==1.1.2

Create a wheel file in a local environment

pip install wheel //use to install wheel module

Create wheelhouse folder and adding the wheel files into it. Using below command

pip wheel -r requirements.txt -w wheelhouse

enter image description here

You can run your azure function to view the status of your function.

Before deploying your azure function into azure make sure you must add the below line of code as the first line in your requirement.txt file

--find-links wheelhouse

enter image description here

I can be able to run and deploy the azure function using wheel in my local and azure.

enter image description here

Refer here

Delliganesh Sevanesan
  • 4,146
  • 1
  • 5
  • 15