bbfrederick/rapidtide

pyfftw version incompatible with scipy version in Docker

Closed this issue · 3 comments

Describe the bug
The Dockerfile installs scipy v1.4.1 and pyfftw v0.11.1. According to scipy v1.4.1 documentation, the scipy.fftpack submodule has been replaced by scipy.fft. However, pfftw v0.11.1 is not designed to use the newer fft submodule and therefore fails with an ImportError when it tries to load scipy.fftpack. Either pfftw needs to be upgraded to the Feb 3rd release (v0.12.0) which has the interfaces for scipy.fft or scipy needs to be downgraded to a version (probably the 1.3 version series) that has scipy.fftpack to prevent this error and allow pyfftw to speed up the transforms.

To Reproduce
Steps to reproduce the behavior:

  1. Pull the latest release from DockerHub: singularity pull docker://fredericklab/rapidtide:1.9.0
  2. Import pyfftw in the python console which will throw errors with loading scipy.fftpack

Expected behavior
Importing should not throw any errors.

Current behavior
Import errors:

Singularity rapidtide_1.9.0.sif:~> python
Python 3.7.1 | packaged by conda-forge | (default, Mar 13 2019, 12:57:14)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyfftw
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/miniconda/lib/python3.7/site-packages/pyfftw/__init__.py", line 43, in <module>
    from . import interfaces
  File "/usr/local/miniconda/lib/python3.7/site-packages/pyfftw/interfaces/__init__.py", line 237, in <module>
    from . import scipy_fftpack
  File "/usr/local/miniconda/lib/python3.7/site-packages/pyfftw/interfaces/scipy_fftpack.py", line 65, in <module>
    from scipy.fftpack import (dct, idct, dst, idst, diff, tilbert, itilbert,
ImportError: cannot import name '_fftpack' from 'scipy.fftpack' (/usr/local/miniconda/lib/python3.7/site-packages/scipy/fftpack/__init__.py)

Desktop (please complete the following information):

  • OS: CentOS 7

Well that seems suboptimal...

I'll push a fix in a few minutes.

Sorry that took so long - it took forever to push the new container. That should be fixed now.

Thanks @bbfrederick! No issues with loading pyfftw with the latest container.