Skip to content

wrong path for fsl_bin in FreeSurferEnv.sh #1071

@mauriliogenovese

Description

@mauriliogenovese

In FreeSurferEnv.sh the directory $FSL_DIR/bin is added to $PATH

### ----------- FSL ------------ ####
if [ -n "$FSL_DIR" ]; then
    export FSLDIR=$FSL_DIR
    export FSL_BIN=$FSL_DIR/bin
    if [ ! -d $FSL_BIN ]; then
        if [[ $output == 1 ]]; then
            echo "WARNING: $FSL_BIN does not exist.";
        fi
    fi
    if [ -e $FSL_DIR/etc/fslconf/fsl.sh ]; then
        source $FSL_DIR/etc/fslconf/fsl.sh
    fi
    export FSLOUTPUTTYPE=NIFTI_GZ
    # use local ImageMagick stuff
    if [ -e /usr/bin/display ]; then
        export FSLDISPLAY=/usr/bin/display
    fi
    if [ -e /usr/bin/convert ]; then
        export FSLCONVERT=/usr/bin/convert
    fi
fi
if [ -n "$FSL_BIN" ]; then
    PATH=$FSL_BIN:$PATH

this can be a problem because in $FSL_DIR/bin there is a python3 that so overcome main system python3 executable
Moreover since fsl 6.0.6 the default bin folder should be $FSLDIR/share/fsl/bin and not $FSL_DIR/bin
If freesurfer need $FSL_DIR/bin instead of $FSLDIR/share/fsl/bin maybe it could be added at the end of path instead at the beginning to preserve user default python executable

PATH=$PATH:$FSL_BIN

link to fsl discussion: https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=ind2302&L=FSL&O=D&X=7824B2EA0E15A0CA6F&Y=mauriliogenovese%40gmail.com&P=67295

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions