Skip to content
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

SPM configuration fails #324

Open
kaurao opened this issue Oct 20, 2019 · 9 comments
Open

SPM configuration fails #324

kaurao opened this issue Oct 20, 2019 · 9 comments

Comments

@kaurao
Copy link

kaurao commented Oct 20, 2019

I have installed pypreprocess in a Python 2.7 virtual environment on Debian 9.9 but without neurodebian travis as I do not have root access. I cannot get the SPM configured.

Here is my test code and associated output.

Code:
import os
from pypreprocess.configure_spm import _configure_spm

print 'SPM_DIR:', os.getenv('SPM_DIR')
print 'SPM_MCR:', os.getenv('SPM_MCR')
print 'SPM CONFIGURED:', _configure_spm(config_spm_dir=os.getenv('SPM_DIR'),
config_spm_mcr=os.getenv('SPM_MCR'))

Output:
191020-14:30:41,988 nipype.utils INFO:
Running nipype version 1.2.3 (latest: 1.2.3)
SPM_DIR: /home/homeGlobal/kpatil/opt/spm12/spm12/
SPM_MCR: /home/homeGlobal/kpatil/opt/spm12/spm12.sh
No handlers could be found for logger "pypreprocess"
SPM CONFIGURED: None

Is this due to travis not installed or something else?
Will be happy to provide any further information.

@KamalakerDadi
Copy link
Contributor

Hi @kaustubhrpatil

Is this due to travis not installed or something else?

I think it might be related to #315

@kaurao
Copy link
Author

kaurao commented Oct 21, 2019

@KamalakerDadi thanks for referencing #315 but I do not get any errors while installing spm mcr or any java related errors.

@KamalakerDadi
Copy link
Contributor

Did you tried with install_spm12.sh in continuous_integration ?

@kaurao
Copy link
Author

kaurao commented Oct 21, 2019

yes I used this script.

@KamalakerDadi
Copy link
Contributor

Do you have MCRInstaller.bin in ~/opt/spm12 ?

Can you try this line in the same directory ?
./MCRInstaller.bin -P bean421.installLocation="mcr"

@kaurao
Copy link
Author

kaurao commented Oct 21, 2019

It finished with this message:

The InstallShield Wizard has successfully installed MATLAB(R) Compiler Runtime 7.13.

Then I re-installed pyprocess producing following log but my test still fails (spm is still None):

Appending pypreprocess configuration to
Ignoring attempt to set 'name' (from '' to 'pypreprocess')
Appending pypreprocess/spm_loader configuration to
Ignoring attempt to set 'name' (from '' to 'pypreprocess/spm_loader')
Appending pypreprocess/external configuration to
Ignoring attempt to set 'name' (from '' to 'pypreprocess/external')
Appending pypreprocess/external/tempita configuration to
Ignoring attempt to set 'name' (from '' to 'pypreprocess/external/tempita')
Appending pypreprocess/external/nistats configuration to
Ignoring attempt to set 'name' (from '' to 'pypreprocess/external/nistats')
Appending pypreprocess/reporting configuration to
Ignoring attempt to set 'name' (from '' to 'pypreprocess/reporting')
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_py
running install_lib
running install_data
running install_egg_info
Removing /home/homeGlobal/kpatil/venv/pypreprocess/lib/python2.7/site-packages/pypreprocess-0.1_git-py2.7.egg-info
Writing /home/homeGlobal/kpatil/venv/pypreprocess/lib/python2.7/site-packages/pypreprocess-0.1_git-py2.7.egg-info
running install_clib
customize UnixCCompiler

@kaurao
Copy link
Author

kaurao commented Oct 21, 2019

Aha while installing I also get multiple warnings, maybe that's a clue?

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data'
warnings.warn(msg)
Warning: Assuming default configuration (pypreprocess/{setup_pypreprocess,setup}.py was not found)Warning: Assuming default configuration (pypreprocess/spm_loader/setup_pypreprocess/{setup_pypreprocess/spm_loader,setup}.py was not found)Warning: Assuming default configuration (pypreprocess/external/setup_pypreprocess/{setup_pypreprocess/external,setup}.py was not found)Warning: Assuming default configuration (pypreprocess/external/tempita/setup_pypreprocess/external/{setup_pypreprocess/external/tempita,setup}.py was not found)Warning: Assuming default configuration (pypreprocess/external/nistats/setup_pypreprocess/external/{setup_pypreprocess/external/nistats,setup}.py was not found)Warning: Assuming default configuration (pypreprocess/reporting/setup_pypreprocess/{setup_pypreprocess/reporting,setup}.py was not found)

@KamalakerDadi
Copy link
Contributor

KamalakerDadi commented Oct 21, 2019

The InstallShield Wizard has successfully installed MATLAB(R) Compiler Runtime 7.13.

Ok. so it not related to the issue #315 then. It is specific to Ubuntu 18.10. I am currently having the same problem.

Coming to your issue. I did a fresh installation without neurodebian travis and I am unable to reproduce the issue you are showing. On Ubuntu 16.04

 _configure_spm(config_spm_dir=os.getenv('SPM_DIR'), config_spm_mcr=os.getenv('SPM_MCR'))
'/home/parietal/kdadi/opt/spm12/spm12/spm12_mcr/spm12'

ATM I am unsure what's happening by looking at the warnings.

@kaurao
Copy link
Author

kaurao commented Oct 23, 2019

I went through the error and after debugging for a while had to make two changes:

  1. In pypreprocess/configure_spm.py added os.environ.get('SPM_DIR') in _SPM_DEFAULTS['spm_dir_template']: this was causing spm not to be detected as the code expects it to be in $HOME/opt or some other hard-coded locations. I also exported 'MATLAB_EXEC' variable pointing to the matlab binary.

  2. Then it gave me another error 'This docstring was not generated by Nipype!' thrown from nipype.unils.spm_docs this was because matlab was not being correctly detected as in my installation command 'matlab' just displays available matlab versions. To fix this I needed to export environmental variable 'MATLABCMD' as 'MATLAB_EXEC' is not used by nipype.

So far the pipeline seems to progress.

Note that I switched to matlab executive with SPM12 directory mode instead of using MCR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants