Hi Matthew,
Errr... no it doesn't:
head -n 1 $(which imcp)
#!/usr/bin/env python3.7
Now, you should be aware that since we run a shared system - often with many different versions of the same software installed - , our software is installed in a custom prefix. So I'm not sure if the prefix you mentioned (#!/usr/local/fsl/fslpython/envs/fslpython/bin/python3.7) is a hardcoded one, or based on the FSLDIR? If it's hardcoded, it wouldn't work for us in any case. If it bases itself of FSLDIR, I'm actually afraid it still won't work, because my FSLDIR contains dashes and I don't think shebangs support that (I've tried to replace it manually, and got a 'bad interpreter: No such file or directory' error because the interpreter invocation got cut off at the first dash).
If you really want to use this particular subset of scripts to use the python3.7 installed in fslpython, but NOT have it as part of the path you COULD decide to have a relative path as shebang. As long as your directory structure with the FSLDIR remains rigid, this would be portable. I.e. imcp could contain something like
#!../fslpython/envs/fslpython/bin/python3.7
Anyway, I think as a workaround, I now only have two options:
1)
export PATH=$FSLDIR/fslpython/envs/fslpython/bin:$PATH
2)
replace the shebangs for all scripts in $FSLDIR/bin with #!../fslpython/envs/fslpython/bin/python3.7 after installation
I tend towards the second option, since otherwise my path is polluted with ALL the binaries in fslpython/bin, which I think is undesirable. Do you see any reason why I should favour one or the other?
Cheers,
Caspar
########################################################################
To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
|