No module named 'nilearn.maskers' Nilearn 9.4.6

Hello community,

I am trying to use the NiftiMapsMasker to get the Group Sparse inverse covariance for a multi-subject connectome (Nilearn 9.4.6), however, the error message tells me there is no such module.
Did something change?

Exact line of code:
from nilearn.maskers import NiftiMapsMasker (just like in the example, see below)

Try following this tutorial instead: Nilearn: Statistical Analysis for NeuroImaging in Python — Machine learning for NeuroImaging

1 Like

Hi, what version of nilearn are you using? the maskers module has been added very recently; you may need to upgrade nilearn with pip install --upgrade nilearn or import the masker from input_data instead of maskers