-
Notifications
You must be signed in to change notification settings - Fork 779
Description
Hey,
I created FSL-6.0.2-foss-2019a-Python-3.7.2.eb as a copy from the currently available old toolchain 6.0.2 release and ran into problems, since fslpython stuff is included in $PATH and $PYTHONPATH.
Unfortunately, I cannot reproduce the exact problem right now, but essentially I was loading FSL, then using some SciPy/numpy down the line and numpy error'ed out on some multiarray not found problem or similar. If necessary, I can try to reproduce.
I think the following is the root of my problem:
$ module load Python/3.7.2-GCCcore-8.2.0
$ which python3
/software/easybuild4/software/Python/3.7.2-GCCcore-8.2.0/bin/python3
$ module purge
$ module load FSL/6.0.2-foss-2019a-Python-3.7.2
$ which python3
/software/easybuild4/software/FSL/6.0.2-foss-2019a-Python-3.7.2/fsl/fslpython/bin/python3
$ module list 2>&1 | grep Python
48) Python/3.7.2-GCCcore-8.2.0
54) VTK/8.2.0-foss-2019a-Python-3.7.2
65) FSL/6.0.2-foss-2019a-Python-3.7.2
I don’t think it’s a good idea to have that fslpython overrule EB’s Python, which is happening in the modextrapaths:
# Adding the bin from the virtualenv was the only way to get things working...
modextrapaths = {
'PATH': 'fsl/fslpython/bin',
'PYTHONPATH': 'fsl/fslpython/envs/fslpython/lib/python3.7/site-packages/',
}
I rebuilt FSL without modextrapaths defined, and double-checked, that the fslpython/envs/fslpython/bin/python3.7 shebang is automatically included in the relevant scripts:
$ head -n1 /software/easybuild4/software/FSL/6.0.2-foss-2019a-Python-2.7.15/fsl/fslpython/envs/fslpython/bin/imcp
#!/software/easybuild4/software/FSL/6.0.2-foss-2019a-Python-2.7.15/fsl/fslpython/envs/fslpython/bin/python3.7
For example imcp works fine:
$ imcp MNI152_T2_1mm test
$ echo $?
0
$ md5sum MNI152_T2_1mm.nii.gz test.nii.gz
b77bc00055bdd7283dba7d038a217b92 MNI152_T2_1mm.nii.gz
b77bc00055bdd7283dba7d038a217b92 test.nii.gz
Therefore, I would suggest dropping modextrapaths from the 6.0.2 easyconfigs - Or is there something I am overlooking?
Thanks!
--crubb