Nilearn.masking failure initial test

Testing fmriprep on HPC with a manually installed setup and received the following error;

$ fmriprep /home/bronson/BIDS /home/bronson/out participant
Traceback (most recent call last):
File “/root/anaconda2/bin/fmriprep”, line 11, in
sys.exit(main())
File “/root/anaconda2/lib/python2.7/site-packages/fmriprep/cli/run.py”, line 199, in main
create_workflow(opts)
File “/root/anaconda2/lib/python2.7/site-packages/fmriprep/cli/run.py”, line 206, in create_workflow
from …workflows.base import init_fmriprep_wf
File “/root/anaconda2/lib/python2.7/site-packages/fmriprep/workflows/base.py”, line 21, in
from …interfaces import (
File “/root/anaconda2/lib/python2.7/site-packages/fmriprep/interfaces/init.py”, line 8, in
from .images import (
File “/root/anaconda2/lib/python2.7/site-packages/fmriprep/interfaces/images.py”, line 15, in
import nilearn.image as nli
File “/root/anaconda2/lib/python2.7/site-packages/fmriprep/interfaces/nilearn.py”, line 12, in
from nilearn.masking import compute_epi_mask
ImportError: No module named masking

So I attempted to install nilearn;

$ pip install nilearn
Requirement already satisfied: nilearn in /root/anaconda2/lib/python2.7/site-packages
Requirement already satisfied: nibabel>=1.2.0 in /root/anaconda2/lib/python2.7/site-packages (from nilearn)

However the following reveals;

$ which nilearn
/usr/bin/which: no nilearn in (/root/abin/:/root/c3d-1.0.0-Linux x86_64/bin/:/root/antsbin/ants/bin/:/usr/local/fsl/bin:/root/anaconda2/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

Any ideas? I was also able to import nilearn within python2.7 without error

It could be a version mismatch. Have you tried installing upgrading nilearn?

BTW you should check out Singularity - it’s the recommended way to run FMRIPREP on HPCs http://fmriprep.readthedocs.io/en/stable/installation.html#singularity-container

Thanks Chris!

pip freeze shows fmriprep 0.6.3 and nilearn 0.3.1

My understanding of Docker has improved somewhat in the past few days, so I might give the Singularity route a go.

Thanks

Hi,

One important detail for your bare metal installation is that fmriprep is not Python 2 compatible. It seems you are trying with Python 2.7.

Cheers,
Oscar

1 Like