Can't get fsl working in Nipype

Hi! I’ve recently started up a Neurodebian virtual machine and the goal is to set up pipeline for post processeing of neuro data with help of nipype. My goal for the moment is just to get started with some example pipeline and learn the basic in how to use Nodes etc.

This example is what I’m doing right now: https://miykael.github.io/nipype_tutorial/notebooks/basic_nodes.html#Example-of-a-simple-node

When I’m running:

from nipype import Node
from nipype.interfaces.fsl import IsotropicSmooth

smooth_node = Node(IsotropicSmooth(), name=“smoothing”)
smooth_node.inputs.in_file = ‘/home/brain/Documents/BIDS_format/sub-01/anat/sub-01_T1w.nii.gz’
smooth_node.inputs.fwhm = 4
smooth_node.inputs.out_file = ‘/home/brain/Documents/out_test/node_T1w_smooth.nii.gz’
smooth_res = smooth_node.run()

I get following error: No command “fslmaths” found on host neurodebian. Please check that the corresponding package is installed.

I’ve google a lot and so far I’ve run “gedit ~/.bashrc” in the terminal and added:

#FSL
FSLDIR=/usr/share/fsl
. ${FSLDIR}/5.0/etc/fslconf/fsl.sh
PATH=${FSLDIR}/5.0/bin:${PATH}
export FSLDIR PATH

If I start a new terminal window and type “fsl”, fsl i starting so it’s at least working. Any suggestions?

Sincerely, Jesper

nipype simply relies on the underlying shell when you run it. so the terminal in which you are running nipype, check if fslmaths is available via which fslmaths. if that returns the path fslmaths, nipype will also find it.

if not, then something is off with your fsl setup.

MANAGED BY INCF