Hello,
I am trying to run the SPM sn3d to AIMS transformation converter.
I got the following error message :
"in SPM sn3d to AIMS transformation converter 1 No module named pymat"
My input parameters :
- read : anat00299_sn.mat
- write : anat00299_sn_TO_spm_template.trm
- normalized image : wanat00299.img
Error log :
ImportError
neuroProcesses.py (1649) in _processExecution:
result = process.execution( self )
SPMsn3dToAims.py (205) in execution:
matlab.matlab().eval( matlabcom )
matlab.py (266) in matlab:
_matlabInstance = Matlab( '"' + matlabExecutable + '" ' + matlabOptions )
matlab.py (112) in __init__:
Matlab.importpymat()
matlab.py (107) in importpymat:
exec( _pymatmoduleimport, globals(), globals() )
<string> (1) in <module>:
?
Thank you for your help,
François
SPM sn3D TO AIMS : failure : no module named pymat
- François Leroy
- Posts: 30
- Joined: Wed Feb 22, 2006 5:22 pm
- François Leroy
- Posts: 30
- Joined: Wed Feb 22, 2006 5:22 pm
Hi,
Here is the matlab environnement set in the BV logbook
matlabRelease = None
matlabExecutable = matlab
matlabOptions = -nosplash -nojvm
matlabPath = ['/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/MSP', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/utils', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/mesh', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/LoadSave', '/neurospin/local/matlab-R2007a/bin/matlab']
matlabStartup = []
Thanks for your help,
François
Here is the matlab environnement set in the BV logbook
matlabRelease = None
matlabExecutable = matlab
matlabOptions = -nosplash -nojvm
matlabPath = ['/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/MSP', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/utils', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/mesh', '/home/appli/Fedora-4/cartopack-linux-3.0.3-2007_01_31shfj/brainvisa/matlab/LoadSave', '/neurospin/local/matlab-R2007a/bin/matlab']
matlabStartup = []
Thanks for your help,
François
Hi,
I spent a little time with François to figure out why the process didnt' work.
I tried with demo data to check the mechanism and we have had the same pb. I removed all settings for matlabpath.
The two processes using matlab (neuropsin package) are displayed but when the process is launched, then it seems there is a pb with the pymat python module. It isn't loaded.
In the meantime, I advise to Francois to use the matlab code of the python pocess to extract the transformation. I hope it helps him.
Isa
I spent a little time with François to figure out why the process didnt' work.
I tried with demo data to check the mechanism and we have had the same pb. I removed all settings for matlabpath.
The two processes using matlab (neuropsin package) are displayed but when the process is launched, then it seems there is a pb with the pymat python module. It isn't loaded.
In the meantime, I advise to Francois to use the matlab code of the python pocess to extract the transformation. I hope it helps him.
Isa
- Yann Cointepas
- Posts: 316
- Joined: Tue Jan 20, 2004 2:56 pm
- Location: Neurospin, Saint Aubin, France
- Contact:
Could it be a licence problem ? Try to use d directly the pymat module from IPython with
Code: Select all
brainvisa --shell (/code].
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Hi,
Well, after looking at it for a while, we found 2 problems:
- one bug in brainvisa when checking matlab version with matlab version 2006a or newer. It's fixed on our repository, and I think you can avoid it by specifying the 'matlabRelease' variable in BV config (set it to 14), then the version checking is bypassed (and it starts faster, too - hum, I mean, a bit less slowly).
- a path problem to matlab engine libraries: you have to set the correct matlab directory in your LD_LIBRARY_PATH environment variable before running brainvisa (I think we cannot set it from BV once python is running). For matlab7 in Neurospin the path is /neurospin/local/matlab/bin/glnx86. But warning: in this directory some old libraries may override some standard system-wide libraries, so you have to set matlab lib path *after* the standard /usr/lib path:(for a bash shell on a 32bit linux)
We will try to find a way to set it automatically for matlab7 in Neurospin.
Denis
Well, after looking at it for a while, we found 2 problems:
- one bug in brainvisa when checking matlab version with matlab version 2006a or newer. It's fixed on our repository, and I think you can avoid it by specifying the 'matlabRelease' variable in BV config (set it to 14), then the version checking is bypassed (and it starts faster, too - hum, I mean, a bit less slowly).
- a path problem to matlab engine libraries: you have to set the correct matlab directory in your LD_LIBRARY_PATH environment variable before running brainvisa (I think we cannot set it from BV once python is running). For matlab7 in Neurospin the path is /neurospin/local/matlab/bin/glnx86. But warning: in this directory some old libraries may override some standard system-wide libraries, so you have to set matlab lib path *after* the standard /usr/lib path:
Code: Select all
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/neurospin/local/matlab/bin/glnx86
We will try to find a way to set it automatically for matlab7 in Neurospin.
Denis