I need to use the Anima command without having to write the entire path every time.
I cannot use animaConvertImage in on an internal file in a folder other than the one where the Anima commands are located.
I'm using macOS in a mac with M1 processor.
I tried using the .bashrc file, but to no avail, specifically:
-I added the following lines to the ~/.bashrc
file in the following way:
gedit ~/.bashrc &
And added:
ANIMAHOME=~/Software/Anima/build
export PATH=$ANIMAHOME/bin:$PATH
export LD_LIBRARY_PATH=$ANIMAHOME/lib:$LD_LIBRARY_PATH
(I did it following a guide but i don't know how it should work; the Anima file included animaConvertImage are located in /Software/Anima/build/bin
. )
Finally I saved and closed the terminal to make the changes active.
Then I used the command:
animaConvertImage -i dwi/Noddi_Combined_Tensors_final.nrrd -I
With dwi folder external to the Software folder I always get as output:
-bash: animaConvertImage: command not found
How can I solve the problem? (I'm not sure if the two are connected to each other since I'm a beginner)
In order to give you more information I ran the following commands:
$ ls -l ~/Software/Anima/build/bin/animaConvertImage
-rwxr-xr-x 1 lorenzomarta staff 3807134 14 Feb 16:07 /Users/lorenzomarta/Software/Anima/build/bin/animaConvertImage
and
$ ps -p $$
PID TTY TIME CMD
3889 ttys000 0:00.08 -bash
ANIMAHOME = ~ / Software / Anima / build
or did you meanANIMAHOME=~/Software/Anima/build
? – terdon Feb 15 '22 at 10:32ls -l ~/Software/Anima/build/animaConvertImage
. You seem to be expecting to find an executable file namedanimaConvertImage
in the directory~/Software/Anima/build/
and the output of thels
command will show us if it actually exists there or not. – terdon Feb 15 '22 at 10:53bash
orzsh
?~/.bashrc
is not really relevant to macOS since newer versions have switched tozsh
instead ofbash
and even older versions which did usebash
wouldn't read~/.bashrc
. – terdon Feb 15 '22 at 11:16ps -p $$
. – terdon Feb 15 '22 at 14:48~/.bashrc
but add them to~/.profile
instead. Then open a new terminal and try runninganimaConvertImage
again, does that work? – terdon Feb 15 '22 at 15:48-bash: animaConvertImage: command not found
– Lorenzo Marta Feb 15 '22 at 15:51~/.bash_profile
? What is the output ofls ~/.bash_profile
? – terdon Feb 15 '22 at 15:52/Users/lorenzomarta/.bash_profile
– Lorenzo Marta Feb 15 '22 at 15:54~/.profile
and add them to~/.bash_profile
instead. Does that make it work? – terdon Feb 15 '22 at 15:55