Problem using SPM Standalone with Python Nipype package

Hi all,

I am using pyhton nipype spm package to realign the NIFTI images. I have used SPM Standalone for this task. When I run the script, I am getting following error:

RuntimeError: Command:

/home/ruba/Documents/spm_installation/spm12/run_spm12.sh /usr/local/MATLAB/MATLAB_Runtime/v97/ /home/ruba/PycharmProjects/testPipeline/Input_data/h3814smmi1/pet/pyscript_realign.m

Standard output:


Setting up environment variables


LD_LIBRARY_PATH is .:/usr/local/MATLAB/MATLAB_Runtime/v97//runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97//bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97//sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97//sys/opengl/lib/glnxa64

Error using spm_cli (line 56)

Cannot find module /home/ruba/PycharmProjects/testPipeline/Input_data/h3814smmi1/pet/pyscript_realign.m.

Error in spm_cli (line 56)

Error in spm_standalone (line 157)

Standard error:

Return code: 1

I put commands at the beginning of the script from this link to set the path of SPM Standalone and MATLAB Runtime Compiler. The script ’ pyscript_realign.m ’ is created as a part of the workflow when I run the nipype library and it exists in that location. Then I tried to run this script from terminal using following command:

/path/to/run_spm12.sh /path/to/MATLAB/Runtime Script

/home/ruba/Documents/spm_installation/spm12/run_spm12.sh /usr/local/MATLAB/MATLAB_Runtime/v97/ /home/ruba/PycharmProjects/testPipeline/Input_data/h3814smmi1/pet/pyscript_realign.m

I got the same error though the script is already in that directory. Can you please give me suggestion to solve this problem?

I am using ‘spm12_r7771_Linux_R2019b’ version downloaded from this link and MCR 2019b version.

Any help will be appreciated. Thanks in advance.

Best Regards,
Rubaida Easmin

MANAGED BY INCF