[pymvpa] Fail to install upstream/0.6.0.dev in a virtualenv(Neuro Debian)

Hiroyuki AKAMA akama.h.aa at m.titech.ac.jp
Tue Dec 21 07:47:20 UTC 2010


Dear Sir

Thank you very much for receiving me in your users' community. I am very glad to get a direct reply from you.
By the way, I am now at a loss trying in vain to do fmri_dataset() in your tutorial. It would be much appreciated pointing out what was wrong.
I am afraid it was due to a very basic mistake...
Here are the results I),II) of the same import task with and without using IPython.
My environment is 0.6.0dev in NeuroDebian on Windows7 64-bit.

I)When using IPython

In [1]: from tutorial_lib import *
/usr/lib/pymodules/python2.6/matplotlib/numerix/__init__.py:18: DeprecationWarning: 
**********************************************************
matplotlib.numerix and all its subpackages are deprecated.
They will be removed soon.  Please use numpy instead.
**********************************************************

  warnings.warn(msg, DeprecationWarning)

In [2]: ds=get_haxby2001_data()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/mnt/host/pymvpa/pymvpa-26e856e/tutorial_data/<ipython console> in <module>()

/mnt/host/pymvpa/pymvpa-26e856e/tutorial_data/tutorial_lib.py in get_haxby2001_data(path, roi)
     40 def get_haxby2001_data(path=None, roi='vt'):
     41     if path is None:
---> 42         ds = get_raw_haxby2001_data(roi=roi)
     43     else:
     44         ds = get_raw_haxby2001_data(path, roi=roi)

/mnt/host/pymvpa/pymvpa-26e856e/tutorial_data/tutorial_lib.py in get_raw_haxby2001_data(path, roi)
     35         return ds
     36     else:
---> 37         return load_datadb_demo_blockfmri(path=path, roi=roi)
     38 
     39 

/usr/local/lib/python2.6/dist-packages/mvpa/misc/data_generators.pyc in load_datadb_tutorial_data(path, roi)
    374     ds = fmri_dataset(samples=os.path.join(path, 'bold.nii.gz'),
    375                       targets=attr.targets, chunks=attr.chunks,
--> 376                       mask=mask)
    377     return ds
    378 

/usr/local/lib/python2.6/dist-packages/mvpa/datasets/mri.pyc in fmri_dataset(samples, targets, chunks, mask, sprefix, tprefix, add_fa)
    234     """
    235     # load the samples

--> 236     imgdata, imghdr = _load_anyimg(samples, ensure=True, enforce_dim=4)
    237 
    238     # figure out what the mask is, but only handle known cases, the rest


/usr/local/lib/python2.6/dist-packages/mvpa/datasets/mri.pyc in _load_anyimg(src, ensure, enforce_dim)
    381         # try opening the beast; this might yield none in case of an unsupported

    382         # argument and is handled accordingly below

--> 383         data = _img2data(src)
    384         if not data is None:
    385             imgdata = data[0]

/usr/local/lib/python2.6/dist-packages/mvpa/datasets/mri.pyc in _img2data(src)
    111     if externals.exists('nifti'):
    112         # maybe pynifti can help

--> 113         import nifti
    114         if isinstance(src, str):
    115             # filename


/usr/local/lib/python2.6/dist-packages/mvpa/datasets/nifti.py in <module>()
     20     from mvpa.base import debug
     21 
---> 22 if externals.exists('nifti', raiseException=True):
     23     if sys.version_info[:2] >= (2, 5):
     24         # enforce absolute import


TypeError: exists() got an unexpected keyword argument 'raiseException'
-----------------------------------------------------------------------------
2)Without using IPython

>>> mvpa.datasets.mri import fmri_dataset
>>> datapath = os.path.join('tutorial_data', 'data')
>>> attrs = SampleAttributes(os.path.join(datapath, 'attributes.txt'))
>>> samples=os.path.join(datapath')
>>> targets=attrs.targets
>>> chunks=attrs.chunks
>>> mask=os.path.join(datapath, 'mask_brain.nii.gz')
>>> ds=fmri_dataset(samples,targets,chunks,mask)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mvpa/datasets/mri.py", line 236, in fmri_dataset
    imgdata, imghdr = _load_anyimg(samples, ensure=True, enforce_dim=4)
  File "mvpa/datasets/mri.py", line 383, in _load_anyimg
    data = _img2data(src)
  File "mvpa/datasets/mri.py", line 113, in _img2data
    import nifti
  File "mvpa/datasets/nifti.py", line 22, in <module>
    if externals.exists('nifti', raiseException=True):
TypeError: exists() got an unexpected keyword argument 'raiseException'
>>> 
Best

Hiroyuki AKAMA
Associate Professor, Graduate School of Decision Science and Technology
Tokyo Institute of Technology,
W9-10, O-okayama, Meguro-ku, Tokyo-152-8552
Japan
akama at dp.hum.titech.ac.jp
http://www.dp.hum.titech.ac.jp
----- Original Message -----
>> From: Michael Hanke <michael.hanke at gmail.com>
>> To: akama.h.aa at m.titech.ac.jp,Development and support of PyMVPA <pkg-exppsy-pymvpa at lists.alioth.debian.org>
>> Date: 2010-12-14 21:01:08
>> Subject: Re: [pymvpa] Fail to install upstream/0.6.0.dev in a virtualenv(Neuro Debian)
>> 
>> Hi and welcome to PyMVPA,
>> 
>> On Tue, Dec 14, 2010 at 04:25:06PM +0900, Hiroyuki AKAMA wrote:
>> > Dear List
>> > 
>> > I am just a beginner of pymvpa and quite new in your group (though my
>> > collaborator Brian already participated in the debates of this ML).
>> > Now I am struggling to install upstream/0.6.0.dev from the source
>> > (http://git.debian.org/?p=pkg-exppsy/pymvpa.git;a=shortlog;h=refs/tags/upstream/0.6.0.dev)
>> > in NeuroDebian on Windows 7 amd-64. 
>> 
>> If you are starting with PyMVPA today, trying 0.6.dev is the right thing
>> to do. However, updating the documentation to match this code is what we
>> are working on right now. Fortunately, we already finished updating the
>> tutorial that you can find at
>> 
>>   http://dev.pymvpa.org/tutorial.html
>> 
>> > The result is as follows.
>> > >>> import mvpa
>> > (success. No warning)
>> > >>> from mvpa.misc.io.base import SampleAttributes
>> > (success. No warning)
>> > >>> from mvpa.datasets.nifti import NiftiDataset
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> > ImportError: No module named nifti
>> 
>> This happens because the module doesn't exist in 0.6 anymore. The
>> comparable 0.6 import would be
>> 
>>   from mvpa.datasets.mri.fmri_dataset
>> 
>> please take a look at the tutorial for more details.
>> 
>> 
>> If your are having difficulties, please report them. Since 0.6 is quite
>> fresh there are probably some rough edges and we'd be glad to iron them
>> out.
>> 
>> Michael
>> 
>> -- 
>> Michael Hanke
>> http://mih.voxindeserto.de
>> 



More information about the Pkg-ExpPsy-PyMVPA mailing list