Reputation: 43
I am trying to Build http triggered python function app. I just initialized it using terminal commands. I have not modified anything in base template. I am trying to run it on localhost but when I use 'func start host' I get this ImportError:
ImportError: dlopen(/opt/homebrew/Cellar/azure-functions-core-tools@4/4.0.3971/workers/python/3.7/OSX/X64/grpc/_cython/cygrpc.cpython-37m-darwin.so, 0x0002): tried: '/opt/homebrew/Cellar/azure-functions-core-tools@4/4.0.3971/workers/python/3.7/OSX/X64/grpc/_cython/cygrpc.cpython-37m-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/cygrpc.cpython-37m-darwin.so' (no such file), '/usr/lib/cygrpc.cpython-37m-darwin.so' (no such file)
even after this error it seems function is hosted on localhost and I get localhost link to trigger api call, but when I try to call via api the host api it doesn't respond and just crashes with following errors.
Upvotes: 3
Views: 4185
Reputation: 1509
Issue is working fine for me when I am starting the func start in python env having the version as 3.10.12.
Also there is another verion 3.9.13 as mentioned in the issue, if that helps. https://github.com/Azure/azure-functions-core-tools/issues/2834
Upvotes: 0
Reputation: 108
This is an existing issue. The workaround could be using the python interpreter from a conda environment
Create a conda environment with supported python version
Go to the root directory of the project
Remove .venv folder
Activate the newly created conda environment
Create new virtual environment using python -m venv .venv/
OR
you could manually select python interpreter while creating the azure function Image
Upvotes: 0
Reputation: 59055
The function runtime does not support M1 processors at this time.
https://github.com/Azure/azure-functions-core-tools/issues/2834
Upvotes: 1