Dwibiascorrect failing with Docker image

Hey Mrtrix community! Having an issue with dwibiascorrect failing, running with a Docker Image I generated with Neurodocker. Other Mrtrix commands are working beautifully, like dwiextract, degibbs and denoise.

The command I am running is:

dwibiascorrect -fsl /data/sub-1000/eddy/eddy_corrected.nii.gz /data/sub-1000/eddy/eddy_bias_corrected.nii.gz -mask /data/sub-1000/eddy/b0_brain_mask.nii.gz -fslgrad /data/sub-1000/eddy/eddy_corrected.eddy_rotated_bvecs /data/sub-1000/sub-101287_ses-20151204x1133_acq-32dir_run-1_dwi.bval -tempdir /data/sub-1000/tmp

The error output I get is:

/usr/bin/env: ‘python’: No such file or directory

Is this something you all can advise on, or should I be trying to problem solve with Neurodocker?

Hi,

(disclaimer: not a dev). This sounds like something that should be addressed within Neurodocker. The official MrTrix3 containers (found here) do not have this problem, and you can see in the MrTrix3 dockerfile (found here) that Python is requested in the official container.

Best,
Steven

Thanks so much Steven, that is a massive help!

Cheers,
Conor

1 Like

You’ll find that all MRtrix3 Python scripts will fail to execute in your container, not just dwibiascorrect.

If you want to get your nerd hat on:

The issue relates to Python 2 / Python 3 compatibility, the sunsetting of the former, and shebangs. In version 3.1.0 we will be removing Python 2 support and hard-wiring all MRtrix3 Python components to use Python 3. While you can make your own softlink called “python” to get things working, or in some OS’s install packages like “python-is-python3”, that’s now discouraged as a long-term solution.