/usr/bin/env: fslpython: No such file or directory when ran fsl_motion_outliers

When I ran fsl_motion_outliers on our school’s linux server (CentOS 7), the error “/usr/bin/env: fslpython: No such file or directory” will pop up. Does anyone know how to fix this issue? (I do not have admin privilege)

I’ve installed fsl correctly with an fslpython folder. However, after googling and trying adding it to PATH the error still persisted.

If related, the specific command I ran was:
fsl_motion_outliers -i Sub0001_Ses1_bld001_rest_skip4_stc_mc -o /GSP/GSP_part1_prep/Sub0001_Ses1/bold/mc/Sub0001_Ses1_bld001_rest_skip4_stc_motion_outliers_confound_DVARS -s /GSP/GSP_part1_prep/Sub0001_Ses1/bold/mc/Sub0001_Ses1_bld001_rest_skip4_stc_motion_outliers_DVARS -p /GSP/GSP_part1_prep/Sub0001_Ses1/bold/mc/Sub0001_Ses1_bld001_rest_skip4_stc_motion_outliers_DVARS -t /GSP/GSP_part1_prep/Sub0001_Ses1/bold/mc/tmp_outliers/001 --dvars --nomoco

Hi @neo,

Did you add $FSLDIR/bin to your path? Is your environment variable $FSLDIR defined? Do other FSL commands work?

Best,
Steven

1 Like

Hi @Steven,

I added $FSLDIR/bin to my path.

$FSLDIR is defined

Other FSL commands such as slicetimer worked correctly.

I also tried adding export PATH="${FSLDIR}/fslpython/bin:$PATH" or export PATH=“${FSLDIR}/fslpython:$PATH” ` but neither worked.

update: solved after reinstalling fsl

FWIW, recent versions of FSL (since FSL 6.0.6) do not have a $FSLDIR/fslpython/ directory

With older versions of FSL, if the installation was interrupted, you could end up with a broken installation where the $FSLDIR/fslpython/ directory was not successfully created, but the installer script would usually detect this and exit with an error message

If you have reinstalled FSL, and do have a $FSLDIR/fslpython/ directory, then you may have used an old version of the fslinstaller.py script. The latest version of the installer can be downloaded from here.

But in any case, it is good to hear that you were able to resolve the problem.

1 Like