Open jimbobbennett opened 2 years ago
hey @jimbobbennett , apologize for the late response and thanks for the link to your repo.
the uamqp doesn't provide apple M1 yet (arm-based) wheel yet, we only support wheels for x86 & x86-64, which means on Apple M1, the library uamqp-python (based on uamqp-c) will need to build itself first which requires extra dependencies.
Are you working with the Apple M1 for local development? one workaround you could try locally is to put cython
into the requirements.txt of the Azure Function to see if it helps the compilation of the library on your Apple M1.
@yunhaoling - tried that, same error.
Hi @jimbobbennett perhaps this could work? I develop azure functions locally and to get around import issues with uamqp I create the venv and install the dependencies using Rosetta. I haven't tried it with azure-iot-hub though.
@yunhaoling, thanks for the info. Would you know of a timeline when uamqp would support Apple M1?
I was running into this problem even when building directly from the source. I had to add the following line in setup.py
on line 172 when cmake
ing azure-uamqp-c
, so that azure-uamqp-c
would be built universal.
""-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"",
I am facing the same issue. Anything we can do as a temporary fix?
pip uninstall uamqp pip install uamqp --no-binary uamqp
found the solution here: https://apple.stackexchange.com/questions/436801/m1-mac-mach-o-file-but-is-an-incompatible-architecture-have-x86-64-need-a
Describe the bug When importing the
azure.iot.hub
package into an Azure Functions Project, the application throws anImportError
:To Reproduce Steps to reproduce the behavior:
azure-iot-hub
to therequirements.txt
file, create a virtual environment and install the packages from this fileazure.iot.hub
in the__init__.py
fileYou can find a project to reproduce this here: https://github.com/jimbobbennett/iot-func-error
Expected behavior It should work and not thrown an exception.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.