fMRIPrep / ModuleNotFoundError: No module named

Hi all,

We are starting to see that the numbers of people encountering the ModuleNotFoundError are on the rise. Typically, this is the error you’d get:

'Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/", line 69, in run_node
    result['result'] =
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 410, in run
    cached, updated = self.is_cached()
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 296, in is_cached
    hashed_inputs, hashvalue = self._get_hashval()
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 490, in _get_hashval
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 517, in _get_inputs
    results = loadpkl(results_file)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/utils/", line 668, in loadpkl
    raise e
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/utils/", line 659, in loadpkl
    unpkl = pickle.load(pkl_file)
ModuleNotFoundError: No module named 'fmriprep.interfaces.images''

The most likely reason for this is that you are reusing a work directory containing cached results that were obtained with a previous fMRIPrep version.

There are only two solutions to this problem: 1) use the same version you used originally; and 2) wipe out the work directory (or use a new path for it).

This error may occur regardless you are using containers or not.

1 Like

Just to add: unless you were using a veeery old version of fMRIPrep, you should be able to keep your FreeSurfer results.