[Mrtrix-discussion] mrtrix installation on Mac OS

Donald Tournier d.tournier at brain.org.au
Fri May 3 20:23:16 PDT 2013


Hi,

Yes, python is going to cause issues over the next few years... The problem
is that python version 3 is now the default on modern distributions (such
As Arch Linux), but version 2 remains the default on most mainstream
distributions, and presumably on MacOSX too. But the python developers
really haven't come up with an easy way to specify which version to use for
a given script - they're both called 'python'. The MRtrix build script work
with version 2, not version 3. The unofficial convention typically used to
get around this problem is to have a python2 symbolic link pointing to the
appropriate executable, as well as the equivalent python3 symbolic link.
That way the script can specify one of these as the interpreter. But this
only works if these links  exist...

Clearly this doesn't work on your MacOS system. You have three options:

- the simplest is to invoke the script using the correct interpreter
directly:
$ python build

- for a more permanent solution, create a symbolic link called python2
somewhere in your PATH pointing to the actual python executable. This
should do the trick (needs root access):
# cd /usr/bin
#  ln -s python python2

- another approach is to modify the build script to invoke python rather
than python2: for this, you only need to change the first line of the build
script to read '#!/usr/bin/python'. I wouldn't necessarily recommend this
since you'll need to repeat this for every future update.

I'll see if I come up with a more portable way of getting this to work. It
would have been a lot simpler if the python developers had thought of this
ahead of time rather than leaving it up to end-users to figure out a
work-around... MRtrix is not the only project affected by this...

Hope this helps.
Cheers,

Donald.
 On 4 May 2013 07:55, "77 mriusr" <usrlog77 at gmail.com> wrote:

> Hi everyone,
>
> I'd like to ask for your help, because I ran into some problems during the
> installation of mrtrix 0.2.11. to my Mac OS X 10.8.3. I finally managed to
> get the dependencies, then performed tar
> xjf mrtrix-0-1.2.11_2013-03-13.tar.bz2 and cd mrtrix-0.2.11 , but after
> it the ./build gives the following error message: -bash: ./build:
> /usr/bin/python2: bad interpreter: No such file or directory.
> What could be the problem? Could it be that the path to python2 is Macintosh
> HD/opt/local/bin/python2 and it is not in usr? MRtrix is installed in one
> subfolder of the User folder. Could you please suggest some solutions?
>
> Thank you in advance!
>
> MA
>
> _______________________________________________
> Mrtrix-discussion mailing list
> Mrtrix-discussion at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20130504/ecf423a8/attachment.html


More information about the Mrtrix-discussion mailing list