finufft
finufft copied to clipboard
Installing finufft on M1 Mac arm64: include and architecture errors after troubleshooting
Hi! I've tried installing finufft for python use on my M1 mac through pip, the wheel file above, and also by compiling manually. Unfortunately, I keep running into the same issues. First, when I make test -j
I run into several "fatal errors" saying " 'omp.h' file not found" in the include lines.
Second, when I try importing it in python 3, I get the same error as the original comment.
I am trying to use this package for some radio antenna work involved in my research. Please let me know what you advise!
Hi, did you brew install libomp ? If so, then it could be a matter of searching for omp.h and explicitly adding directory via adding a -Idirectory to flags in whatever make.inc you're using. Layouts of OS systems change. Search for related fixes, eg https://github.com/lczech/gappa/issues/15
@lu1and10 may have more input, as a mac user. Keep us updated, esp if you have updates that work - we will add them to our docs and make.inc versions. Best, Alex
On Wed, Jun 29, 2022 at 3:03 AM tmygupta @.***> wrote:
Hi! I've tried installing finufft for python use on my M1 mac through pip, the wheel file above, and also by compiling manually. Unfortunately, I keep running into the same issues. First, when I make test -j I run into several "fatal errors" saying " 'omp.h' file not found" in the include lines. [image: Screen Shot 2022-06-28 at 23 58 59] https://user-images.githubusercontent.com/100881820/176372093-045a5e2d-859b-42e9-964f-a1beea7886d9.png
Second, when I try importing it in python 3, I get the same error as the original comment. [image: Screen Shot 2022-06-29 at 00 00 41] https://user-images.githubusercontent.com/100881820/176372454-64f13b57-b569-4c7c-95cb-5e2452596c2f.png
I am trying to use this package for some radio antenna work involved in my research. Please let me know what you advise!
— Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/230, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSW6MRTN2XBBOJGBJHTVRPYL7ANCNFSM52ETT5WA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942
Did you fix this? we have M1 users now; see make.inc.macosx_arm64*
Not the original user but I am getting the exact same errors either when installing through pip3 or building myself in PyCharm. Is there any solution to make it work ?
Not the original user but I am getting the exact same errors either when installing through pip3 or building myself in PyCharm. Is there any solution to make it work ?
We have not include pip binary wheels for m1,m2, we will include in the next release.
It turns out that brew changes the libomp lib and include files directory(not in /opt/homebrew/lib and /opt/homebrew/include), I just updated make.inc.macosx_arm64. You could follow the instruction install libomp and fftw using brew and then use the latest make.inc.macosx_arm64 to try to build from source.
Note we have cmake for C++ build, and we are switching to use skbuild for python in the next release, so makefile may be deprecated in the next release.
In case others stumble upon this: in my case, after failing to use finufft on arm64 (couldn't build from source), the easiest was to set an x86 environment (see e.g. here). Install with pip install finufft
worked fine then.