MRtrix3Tissue installation error

Hi @math_priyanka,

Yes, that would most likely be due to anaconda being in your path. We’ve noticed recent installs of FSL come bundled with their own miniconda environment, and if you’re not careful, that will end up in your own PATH. We typically try to deal with the presence of conda-related entries in the PATH, but this works by detecting the presence of conda in the folder name somewhere – which isn’t the case with the FSL-supplied version. So our own attempts at avoiding the issue don’t work here.

Nonetheless, the presence of the FSL-supplied anaconda compiler in your PATH indicates that your FSL install isn’t quite right. What the FSL devs have done is to put their FSL commands, which were in $FSLDIR/bin, into $FSLDIR/share/fsl/bin, and put the full miniconda environment into $FSLDIR/bin. This means that adding $FSLDIR/bin to your PATH manually (which is what we all used to do…) immediately causes (a lot of) conflicts – and not just with MRtrix3!

The right way to set up FSL (if installed using their fslinstaller script) is just to set the $FSLDIR environment variable, and run the appropriate shell config script. On my system, in the BASH shell, this looks like:

export FSLDIR=/opt/fsl
. "${FSLDIR}"/etc/fslconf/fsl.sh

In other words, do not manually modify your PATH to include $FSLDIR/bin – let the fslconf script do that for you, and that should work for all versions of FSL… :crossed_fingers:

So to cut a long story short, look into your shell startup scripts (~/.bashrc, ~/.profile, or maybe ~/.cshrc, ~/.tcshrc, ~/.zshrc, … depending on what shell you use…) and locate where FSL is being set up, make sure you remove the bit that manually modifies the PATH, and copy/paste the instructions above (they may need to be modified for different shells – the above should work for sh, bash and zsh). Once that’s done, restart your terminal, and check that your PATH does not include $FSLDIR/bin (using e.g. echo $PATH). If this all checks out, the MRtrix3 (or MRtrix3Tissue) install should work correctly.

Hope this helps…
Donald.


For completeness, this is the relevant comment within my own copy of $FSLDIR/etc/fslconf/fsl.sh (lines 17-31):

# If this is an official (fslinstaller-installed) FSL
# installation, wrappers to FSL executables will have
# been created in $FSLDIR/share/fsl/bin/ We add this to
# the $PATH, rather than adding $FSLDIR/bin/ to the
# path, to avoid clobbering the user's environment with
# other executalbes that have been installed into
# $FSLDIR/bin/ (e.g.  python).
#
# The fslinstaller creates a file called
# $FSLDIR/etc/fslversion when it installs official FSL
# installations.
#
# If this is a manually managed installation, it is the
# user's responsibility to add $FSLDIR/bin to the $PATH
1 Like