
Description
Summary
I am attempting to execute an antsRegistration /antsRegistrationSynQuick node. I recieve an error message indicating that the command 'antsRegistration' cannot be found. I have attempted to sort out my python environment but I am fully capable of running the other nodes from other softwares.
I have checked my .bashrc and my .bashrc_profile (bash is my base/default, although I have also added the paths to a .zshrc) and I can execute both of these from the command line. The following are the results. First from python when running a Registration interace. The second from command line when I run antsRegistration.
Actual behavior
reg = RegistrationSynQuick()
reg.inputs.fixed_image = '/usr/local/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz'
reg.inputs.moving_image = '/Users/James/Desktop/prac/sub-ID01_ses-1_resting_state_fmri.nii.gz'
reg.run()
OSError Traceback (most recent call last)
in
2 reg.inputs.fixed_image = '/usr/local/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz'
3 reg.inputs.moving_image = '/Users/James/Desktop/prac/sub-ID01_ses-1_resting_state_fmri.nii.gz'
----> 4 reg.run()
~/opt/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py in run(self, cwd, ignore_exception, **inputs)
395 try:
396 runtime = self._pre_run_hook(runtime)
--> 397 runtime = self._run_interface(runtime)
398 runtime = self._post_run_hook(runtime)
399 outputs = self.aggregate_outputs(runtime)
~/opt/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py in _run_interface(self, runtime, correct_return_codes)
779 'No command "%s" found on host %s. Please check that the '
780 "corresponding package is installed."
--> 781 % (executable_name, runtime.hostname)
782 )
783
OSError: No command "antsRegistrationSyNQuick.sh" found on host Jamess-MBP.broadband. Please check that the corresponding package is installed.
Note that this error also occurs with other ANTs programs like antsRegistration
IN TERMINAL
(base) Jamess-MBP:~ James$ antsRegistrationSynQuick.sh
Usage:
antsRegistrationSyNQuick.sh -d ImageDimension -f FixedImage -m MovingImage -o OutputPrefix
Example Case:
antsRegistrationSyNQuick.sh -d 3 -f fixedImage.nii.gz -m movingImage.nii.gz -o output
ETC ETC. you get the idea. I can run it in terminal without issue.
Expected behavior
I would expect nipype to be able to find the executables following the proper PATH from the .bashrc's but it appears that nipype cannot make that determination for ANTS alone (FSL's FLIRT or AFNI's 3dDespike will execute without issue).
Platform details:
Mac OSX Catalina Version 10.15.4
200407-19:15:42,773 nipype.utils INFO:
No new version available.
{'commit_hash': '%h',
'commit_source': 'archive substitution',
'networkx_version': '2.4',
'nibabel_version': '3.0.1',
'nipype_version': '1.4.2',
'numpy_version': '1.18.1',
'pkg_path': '/Users/James/opt/anaconda3/lib/python3.7/site-packages/nipype',
'scipy_version': '1.4.1',
'sys_executable': '/Users/James/opt/anaconda3/bin/python',
'sys_platform': 'darwin',
'sys_version': '3.7.4 (default, Aug 13 2019, 15:17:50) \n'
'[Clang 4.0.1 (tags/RELEASE_401/final)]',
'traits_version': '6.0.0'}
(base) Jamess-MBP:~ James$
Execution environment
jupyter lab from Terminal