Failure to find FFTW libraries on Mac Big Sur (11.3.1)

4
closed
gabrielb09
gabrielb09
Posted 1 year ago

Failure to find FFTW libraries on Mac Big Sur (11.3.1) #314

Im sure anyone reading this is all too familiar with issues such as mine (given by the number of posts referring to this issue). I am running Mac OS X Big Sur (11.3.1). I have python 3.9.4 installed via pyenv which is installed through home-brew. I have also installed FFTW through home-brew and followed the Mac installation instructions.

export DYLD_LIBRARY_PATH=/usr/local/lib export LDFLAGS="-L/usr/local/include" export CFLAGS="-I/usr/local/include"

Unfortunately pyfftw still fails to find the FFTW libraries when installing via pip. Any advice would be greatly appreciated.

andrej5elin
andrej5elin
Created 1 year ago

I had the same issue. Please try these instructions:

https://github.com/andrej5elin/howto_fftw_apple_silicon

gabrielb09
gabrielb09
Created 1 year ago

Ah, perhaps it is worth me clarifying, I am not running Apple Silicon, still on Intel. Are these instructions valid for intel x86 architecture?

andrej5elin
andrej5elin
Created 1 year ago

Well, the fftw compilation step is M1-specific, but the pyfftw install should work. Also see the workaround of https://github.com/pyFFTW/pyFFTW/issues/303#issue-797681591

If you plan to compile fftw yourself on Intel Macs replace the --enable-neon --enable-armv8-cntvct-el0 with --enable-avx2 or one of the other SIMD options that fftw allows to use and you should be fine.

gabrielb09
gabrielb09
Created 1 year ago

It all makes sense now, thank you for bearing with me!