Mrtrix3 installation on windows 7 platform

I have installed mrtrix3 configured, builded the libraries…however I am getting the error while trying to execute the command
mrview: command not found…pls help.

That would be an issue with the PATH. Have you followed the steps to set this up? And restarted a fresh terminal to make sure your changes take effect? If that still doesn’t work, what does:

$ echo $PATH 

report?

yes sir,
I have followed the steps mentioned in the link. I am giving the path as sshown below:
echo “export PATH=$(pwd)/release/bin:$(pwd)/scripts:$C:\msys64” >> ~/.bashrc

that is the path of my shell startup file. However it still not working.

Hi @Chandrajit,

The line you have provided is the recommended mechanism for ensuring that the MRtrix3 executable directories are added to the PATH environment variable every time you start a new terminal session; that’s what allows you to run MRtrix3 commands by their name alone, rather than providing the full path to their location every time. The command that @jdtournier requested will print the contents of that environment variable, which may provide a clue as to why your system is not finding these commands.

For instance: the $(pwd) part of that line inserts text corresponding to the path of the current working directory; this is why this line must be executed from the directory in which MRtrix3 is installed.

Furthermore, your command is ignoring the existing contents of PATH and completely over-writing it with only those three directory locations; this may affect your ability to execute other commands within your terminal. Is there a reason why you are not using the command as it appears in the documentation? i.e.:
echo "export PATH=$(pwd)/release/bin:$(pwd)/scripts:$PATH" >> ~/.bashrc

To really understand what the problem is, it would really help if you could post the output of this command:

$ echo $PATH

and also copy/paste the content of your ~/.bashrc file so we can double-check everything is as it should be…

$ echo $PATH
output is:

/home/Administrator/mrtrix3/release/bin:/home/Administrator/mrtrix3/scripts:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

contents of the ~/.bashrc

export PATH=/home/Administrator/mrtrix3/release/bin:/home/Administrator/mrtrix3/scripts:$C:\msys64
export PATH=/home/Administrator/mrtrix3/release/bin:/home/Administrator/mrtrix3/scripts:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
export PATH=/home/Administrator/mrtrix3/release/bin:/home/Administrator/mrtrix3/scripts:$PATH

$ mrview

output of mrview:

C:/msys64/home/Administrator/mrtrix3/release/bin/mrview.exe: error while loading shared libraries: mrtrix-0.3.14.dll: cannot open shared object file: No such file or directory

@jdtournier: On windows, the lib directory has to be added to the PATH variable or the mrtrix DLL has to be copied to the bin directory (this is not the case on Linux or Mac). I think we need to either fix the windows manual or create the dll in the bin directory.

@Chandrajit: from the .bashrc completely remove all lines that contain the string “mrtrix3” and insert the following line at the bottom:

export PATH=~/mrtrix3/release/bin:~/mrtrix3/release/lib:~/mrtrix3/scripts:$PATH

Close the MSYS terminal and open it again. It should work now.

Cheers,
Ben

I thought I’d fixed that a while back… But the problem here is that platform.system() returns MINGW64_NT-10.0, rather than the expected msys or mingw, so we’re not detecting this as a Windows platform. I’ll fix that up now.

EDIT: that’s not the issue. Not sure what’s going on here…

@Chandrajit, could you post the output of:

$ ls  /home/Administrator/mrtrix3/release/bin

and

$ ls  /home/Administrator/mrtrix3/release/lib

just to check whether that dll is genuinely in the wrong place…?

And can I confirm that this is an up to date version of MRtrix3?

Yes @bjeurissen the GUI is now showing up with the command mrview.
I followed your steps of completely removing all lines that contain the string “mrtrix3” and insert the following line at the bottom:
export PATH=~/mrtrix3/release/bin:~/mrtrix3/release/lib:~/mrtrix3/scripts:$PATH

However a simple example to start with will be very helpful for me.

@jdtournier when I am executing the commands
$ ls /home/Administrator/mrtrix3/release/bin

and

$ ls /home/Administrator/mrtrix3/release/lib

it is showing
bash: $: command not found

Sorry, the ‘$’ represents your command prompt - it’s not part of the command to be copy/pasted…

But no need to worry about it, it’s actually pretty obvious if @bjeurissen’s fix worked that the DLL ended up in release/lib - which it shouldn’t assuming you have a relatively recent version of the code (at least no older than a month or so). I’m just tried on my system, and the DLL ends up in the right place. I’ve no idea why this wouldn’t work for you…

what is the output of the commands
$ ls /home/Administrator/mrtrix3/release/bin

and

$ ls /home/Administrator/mrtrix3/release/lib
even if it doen’t work for me…will it matter a lot or Can I start with the example programs?
secondly when I am executing …
$ mrview anat.mif -run "tractography.load tracks.tck"
it is showing…
mrview: [ERROR] unknown option "-run"
Segmentation fault

No, it shouldn’t matter, as long as your install is up to date. I’m concerned that the procedure didn’t work out for though, so I’d like to understand it before it causes trouble for someone else. Things work fine on my system, so I don’t understand why they wouldn’t on yours…

The syntax has changed a while back. Type mrview -help for the current options. You’re looking for simply:

$ mrview anat.mif -tractography.load tracks.tck

Hi,
I need some tutorials or some examples to start with as a beginner …

There is a tutorial on the documentation website - although as pointed out recently, it could do with a bit more detail. Hopefully we’ll flesh it out over the next few weeks (absolutely no time right now, unfortunately).