-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nipype does not recognize ANTS #3202
Comments
Nipype doesn't do anything special relative to Python, so if it can't find the script, then its copy of |
You're right! In this instance, restarting jupyter lab allowed it to find the ANTs path. Thank you! |
Dear all, I am having the same issue but do not know how to set up m tcsh shell so this command runs. Could you let me know how to do this? |
Please open a new issue with details of how you are running ANTs outside nipype and how you are running nipype. |
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
Execution environment
jupyter lab from Terminal
The text was updated successfully, but these errors were encountered: