python-2.7installationpyfftw

Error in linking fftw libraries for pyFFTW installation


I tried to install pyFFTW 0.9.2 to OSX mavericks, but I encounter the following errors:

/usr/bin/clang -bundle -undefined dynamic_lookup
-L//anaconda/lib -arch x86_64 -arch x86_64 
build/temp.macosx-10.5-x86_64-2.7/anaconda/lib/python2.7/site-packages/pyFFTW-master/pyfftw/pyfftw.o 
-L//anaconda/lib -lfftw3 -lfftw3f -lfftw3l -lfftw3_threads -lfftw3f_threads -lfftw3l_threads 
-o build/lib.macosx-10.5-x86_64-2.7/pyfftw/pyfftw.so

ld: library not found for -lfftw3

clang: error: linker command failed with exit code 1 (use -v to see invocation)

As mentioned in pyFFTW installation -> cannot find -lfftw3_threads, I tried to compile and install fftw 3.3.4 for three times. But it is not working for me.

How I did was:

./configure --enable-float --enable-share  => make => make install
./configure --enable-long-double --enable-share  => make => make install
./configure --enable-threads --enable-share  => make => make install

then I run python (2.7) setup files in pyFFTW folder, and I get the error above.

I appreciate your help.


Solution

  • I had the same issue on OSX 10.9.4 Maverick. Try this: download FFTW 3.3.4 than open a terminal window and go in the extracted FFTW directory and run these commands:

    $ ./configure --enable-long-double --enable-threads
    $ make
    $ sudo make install
    $ ./configure --enable-float --enable-threads
    $ make
    $ sudo make install
    

    Than install pyFFTW using pip as suggested:

    $ sudo pip install pyfftw