pythonpython-2.7numpyfftwpyfftw

How to get pyFFTW running?


I am basically looking for a faster alternative to scipy.fftpack.fft and found pyFFTW.

However, I am about to despair since no matter what I am trying I am not getting pyFFTW to work.

What I did so far:

As soon as I try to import pyFFTW, the following exception occurs:

Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] 

on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyfftw
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\Python27\lib\site-packages\pyfftw\__init__.py", line 16, in <module> from .pyfftw import (
  File "__init__.pxd", line 861, in init pyfftw.pyfftw (C:\projects

\pyfftw\pyfftw\pyfftw.c:17297)

ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 104, got 112

I am using numpy 1.7.1.

Any suggestions about how to fix this problem are highly appreciated.

BTW: I already tried to uninstall / install numpy and pyFFTW several times.


Solution

  • You need to upgrade numpy. Whatever binary you found was compiled against a too-new copy of numpy.