dwifslpreproc error in conda environment

Dear MRtrix experts,

I am trying to use MRtrix via the supercomputer server of my research institution. I have installed the MRtrix using the following command lines.

module load python/3.8.x-anaconda
conda create -n mrtrix
conda activate mrtrix
conda install -c mrtrix3 mrtrix3

I also installed fsl for dwifslpreproc using the below command.

conda install -c conda-forge fslpy

However, dwifslpreproc doesn’t run with the below error message.

dwifslpreproc: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.

dwifslpreproc: [ERROR] Environment variable FSLDIR is not set; please run appropriate FSL configuration script

Could you please let me know what is an issue here and how to resolve?


Hi JW,

The issue is simply that FSL expects a few settings to be active when it runs – and dwifslpreproc relies heavily on FSL tools (specifically topup and eddy). So while you have installed the FSL package, you still need to make sure FSL is configured correctly on your system. There are instructions on how to do this on the FSL wiki, hopefully that’ll address the issue.

All the best,

1 Like