Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: cannot install cffi-1.16.0 dependency: binary dependencies without wheels are not supported when building locally. #1556

Open
ogiel opened this issue Jul 24, 2024 · 2 comments

Comments

@ogiel
Copy link

ogiel commented Jul 24, 2024

Version

4.0.5801

Description

Building Azure Functions packages fails when using packages that rely on cffi (e.g. azure-identity).

I am trying to deploy code to function apps through Bicep (URL deployment) and a storage account that contains the zip package. I create the .zip by running func pack in the function app but keep getting this error:

ERROR: cannot install cffi-1.16.0 dependency: binary dependencies without wheels are not supported when building locally. Use the "--build remote" option to build dependencies on the Azure Functions build server, or "--build-native-deps" option to automatically build and configure the dependencies using a Docker container. More information at https://aka.ms/func-python-publish

I tried building with the following steps:
Windows Python 3.11
Windows Python 3.9
Macbook Python 10
Docker (through --build-native-deps) Python 3.11
Docker (through --build-native-deps) Python 3.9

I already figured out that this specifically happens when trying to use azure-identity so the steps to reproduce are really easy.

If there are better ways to automate deployment (Python to consumption plan func apps) I would like to hear them because this has been causing quite the frustration.

Steps to reproduce

  1. Create function app (I have Python V1 model)
  2. Run func pack to make sure it works
  3. Add azure-identity to requirements.txt
  4. Run func pack to get the error
@ogiel ogiel changed the title RROR: cannot install cffi-1.16.0 dependency: binary dependencies without wheels are not supported when building locally. ERROR: cannot install cffi-1.16.0 dependency: binary dependencies without wheels are not supported when building locally. Jul 24, 2024
@tganwani
Copy link

tganwani commented Aug 4, 2024

I face the same issue.
Do we have a fix in the works?

@ogiel
Copy link
Author

ogiel commented Aug 4, 2024

@tganwani I fixed this by installing my requirements through DevOps pipelines steps in my CI/CD pipeline which fortunately works and takes care of the whole packaging process now.

Something that has to be considered what I noticed is that running your pip install locally has to have the same python version as the function app runtime you're pushing to. Might be worth checking in your case.

@shreyabatra4 shreyabatra4 reopened this Aug 5, 2024
@shreyabatra4 shreyabatra4 transferred this issue from Azure/azure-functions-core-tools Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants