Compatibility issues M2 chip FSL and Nipype

for my masterthesis I need to use nipype and FSL. I am working with a mac book pro with a M2 chip. I installed successfully fsl and nipype in a conda environment. Then I applied it on a tutorial example of nipype. But I always get the following error. I wonder if this issue is because of lack of any compatibility. Can somebody help me, i tried already a lot of things too. Has somebody experiences with FSL and Nipype and M2 Mac Book?

Traceback (most recent call last):
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/pipeline/plugins/", line 47, in run
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/pipeline/engine/", line 527, in run
result = self._run_interface(execute=True)
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/pipeline/engine/", line 645, in _run_interface
return self._run_command(execute)
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/pipeline/engine/", line 771, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node mcflirt.

mcflirt -in /Users/theresasolymos/Desktop/NiPypeTrial/preproc01/slicetimer/DIFF.AD.nii.gz_tmp_st.nii -meanvol -out /Users/theresasolymos/Desktop/NiPypeTrial/preproc01/mcflirt/DIFF.AD.nii.gz_tmp_st_mcf.nii -plots


Traceback (most recent call last):
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/interfaces/base/", line 400, in run
outputs = self.aggregate_outputs(runtime)
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/interfaces/base/", line 429, in aggregate_outputs
predicted_outputs = self._list_outputs() # Predictions from _list_outputs
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/nipype/interfaces/fsl/", line 936, in _list_outputs
if LooseVersion(Info.version()) < LooseVersion("6.0.0"):
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/looseversion/", line 151, in __lt__
c = self._cmp(other)
File "/Users/theresasolymos/miniconda3/envs/FSLXX/lib/python3.10/site-packages/looseversion/", line 199, in _cmp
if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'

I am gettng this same error. I think it is an issue with Nipype not working with the newer Python versions. I was trying to run it on 3.12.2.

I cannot find out in the documentation with which Python versions NiPype is compatible, but judging from this nipype/docker/ at master · nipy/nipype · GitHub it seems that it would work with 3.8

I now tried with python 3.8.19 and it worked.