Build Python Module Wheel for linux/arm64

While itk itself publishes wheels for pretty much all relevant architectures, I am facing the issue that I need to build a linux/arm64 python wheel for a specific module for which a linux/arm64 wheel is not available.

The official build scripts supplied by ITKPythonPackage are aimed at linux/x86 architecture only, and as far as I could find building a python wheel for an ITK module against the officially published python packages is not well documented. I guess it is too much of an edge use case.

In consequence, manually building the wheel becomes rather non-trivial for somebody not familiar in-depth with ITK and its build process.

I realise that this is a very general request, but any pointer in the right direction regarding this issue would be greatly appreciated, and would likely save me a (very) great deal of trial and error.


@Tom_Birdsong, I think you are the most up-to-date on this. There is also an associated GitHub issue.

@jcfr and @thewtex would be the best ones to weigh in here regarding target platforms.

I believe this is related to tarball specializations in our CI:

Different ITK build specializations are packaged here to use in building module wheels:

I wanted to briefly check back in with you, whether anybody would be willing to help out by providing some additional information/documentation on this, or ideally even an extension of the existing build-scripts. As stated before, I realize that this is probably more of a niche problem, and as such I fully understand if its not considered worth it to sink any time or effort into this.

I hope that I do not seem impatient, but it would just be really great to know in which direction this is moving, so that I can plan accordingly. Thanks!

Hi @mdevl ,

Scripts to support building linux/arm64 remote module wheels will be added with 5.3.0 per

That’s great! So my understanding is that we can now build ARM64 Python packages for both Linux and MacOS but can one does that with Github actions? A colleague of mine build MacOS Python packages for another software using, (see Wheel for M1 by tbaudier · Pull Request #85 · OpenGATE/opengate · GitHub), is this a good option in your opinion?

Hi matt, that is great news. Looking very much forward to the release of 5.3.0.

Big thanks to you and everybody else involved for investing the time and effort to officially support building arm64 module wheels.

I already tried compiling, but I think at the current time it still fails due to the submodule in question being at 5.2. So hopefully that will resolve itself after a version bump.

Just as an fyi: while ITKPythonPackage is now officially on 5.3.0, the is still hardcoded to ITK_PACKAGE_VERSION:=v5.2.0.post1. Just wanted to mention it, in case it is not intentional (I changed it manually when I tried to build the wheel).

@mdevl thanks for the testing and the feedback!

We have the v5.3.0 released. ITK_PACKAGE_VERSION has been updated accordingly.

ARM support for building remote module Python is in the works here:

Testing appreciated.

Also, testing and feedback here:

Also, help getting the warnings addressed for ARM builds in CI:

is welcome. This will keep ARM support strong into the future.