MRTRIX3 error

When I want to run dwifslpreproc command, I am faced with this error. Can anyone please help me to fix it?

(# dwifslpreproc sub-02_den.mif sub-02_den_preproc.mif -nocleanup -pe_dir AP -rpe_pair -se_epi b0_pair.mif -eddy_options " --slm=linear --data_is_shelled"
Traceback (most recent call last):
File “C:/msys64/home/User/mrtrix3/bin/dwifslpreproc”, line 1327, in
import mrtrix3
File “C:/msys64/home/User/mrtrix3/bin/”, line 58, in
if not imported (os.path.join (os.path.dirname (build_path), ‘lib’)):
NameError: name ‘build_path’ is not defined

Hi @Savithru,

Can I check whether this is the pre-compiled download that we provide for MSYS2, or did you compile MRtrix from source? Either way, this error suggests that the lib/mrtrix3/ folder (or the it would be expected to contain) is not found at the expected location – which in your case should be C:/msys64/home/User/mrtrix3/lib/mrtrix3. Assuming that’s the case, your MRtrix install has somehow got corrupted.

The fix for this would depend on exactly why that happened, and how you originally installed MRtrix. But the simplest is probably to reinstall MRtrix – again, assuming that is indeed the problem…

All the best,

@jdtournier Thank you very much for your input.I will try to reinstall MRTRIX…hoping that would work.
Best regards,