[pymvpa] installation

Thorsten Kranz thorstenkranz at googlemail.com
Wed Mar 2 12:38:01 UTC 2011


Hi Amit,

I cannot tell you exactly why the import of nibabel does work if you
try to import it directly and doesn't when mvpa tries to import it.
I'd suggest that you compare the sys.path-variable in both scripts.
There are so many ways it can get changed and thus cause import
errors.

Just insert:

import sys
print sys.path

into your scripts, directly before the line causing the error. Maybe
you run the scripts not the same way?

2011/3/2 amit patel <damitamit82 at hotmail.co.uk>:
> i have also added such directory to the path so it should be able to find
> it.
>
>>>> sys.path.append("/home/amit/tutorial_data/data")
>

The variable sys.path is only used for the import-process of python,
for searching for packages and modules. It is NOT used when a relative
path to some file is given. Maybe you don't have the desired file in
the right place?

Greetings,
Thorsten


> thanks in advance
>
> Amit
>
>>>> ds = get_haxby2001_data()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/home/amit/tutorial_data/tutorial_lib.py", line 44, in
> get_haxby2001_data
>     ds = get_raw_haxby2001_data(roi=roi)
>   File "/home/amit/tutorial_data/tutorial_lib.py", line 39, in
> get_raw_haxby2001_data
>     return load_datadb_demo_blockfmri(path=path, roi=roi)
>   File "mvpa/misc/data_generators.py", line 375, in
> load_datadb_tutorial_data
>     attr = SampleAttributes(os.path.join(path, 'attributes.txt'))
>   File "mvpa/misc/io/base.py", line 408, in __init__
>     sep=None, dtype=dtypes)
>   File "mvpa/misc/io/base.py", line 118, in __init__
>     dtype=dtype, skiplines=skiplines)
>   File "mvpa/misc/io/base.py", line 214, in _from_file
>     file_ = open(filename, 'r')
> IOError: [Errno 2] No such file or directory: './data/attributes.txt'
>
>>>> mvpa.wtf()
> Current date:   2011-03-01 14:10
> PyMVPA:
>  Version:       0.6.0~rc1
>  Hash:          feda3f526efd71a5ae34f0c1fd3d8f2334d5f412
>  Path:          mvpa/__init__.py
>  Version control (GIT):
>  GIT information could not be obtained due "mvpa/.. is not under GIT"
> SYSTEM:
>  OS:            posix Linux 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16
> 20:45:36 UTC 2010
>  Distribution:  Ubuntu/10.10/maverick
> EXTERNALS:
>  Present:       cPickle, ctypes, good scipy.stats.rdist, good
> scipy.stats.rv_discrete.ppf, griddata, gzip, matplotlib, mdp, mdp ge 2.4,
> nibabel, numpy, pylab, pylab plottable, pywt, pywt wp reconstruct,
> reportlab, scipy, sg ge 0.6.4, sg ge 0.6.5, sg_fixedcachesize, shogun,
> shogun.krr, shogun.mpd, shogun.svmocas
>  Absent:        atlas_fsl, atlas_pymvpa, elasticnet, glmnet, h5py, hcluster,
> lars, libsvm, libsvm verbosity control, lxml, mass, nipy, nose, openopt,
> pprocess, pywt wp reconstruct fixed, rpy2, running ipython env,
> shogun.lightsvm, shogun.svrlight, skl, weave
>  Versions of critical externals:
>   shogun:full : 0.9.3_r4889_2010-05-27_20:52_
>   shogun:rev  : 4889
>   reportlab   : 2.4
>   shogun      : 0.9.3
>   matplotlib  : 0.99.3
>   scipy       : 0.7.2
>   mdp         : 2.6
>   numpy       : 1.3.0
>   ctypes      : 1.1.0
>   matplotlib  : 0.99.3
>   nifti       : failed to query due to "nifti is not a known dependency
> key."
>   numpy       : 1.3.0
>   pywt        : 0.2.0
>   shogun      : v0.9.3_r4889_2010-05-27_20:52_
>  Matplotlib backend: TkAgg
> RUNTIME:
>  PyMVPA Environment Variables:
>    PyMVPA Runtime Configuration:
>   [externals]
>   have griddata = yes
>   have pprocess = no
>   have good scipy.stats.rdist = yes
>   have pylab plottable = yes
>   have pywt wp reconstruct = yes
>   have h5py = no
>   have lxml = no
>   have running ipython env = no
>   have nibabel = yes
>   have sg_fixedcachesize = yes
>   have elasticnet = no
>   have shogun.mpd = yes
>   have matplotlib = yes
>   have pywt wp reconstruct fixed = no
>   have scipy = yes
>   have reportlab = yes
>   have openopt = no
>   have libsvm = no
>   have nose = no
>   have weave = no
>   have atlas_fsl = no
>   have ctypes = yes
>   have hcluster = no
>   have sg ge 0.6.4 = yes
>   have sg ge 0.6.5 = yes
>   have good scipy.stats.rv_discrete.ppf = yes
>   have libsvm verbosity control = no
>   have mdp ge 2.4 = yes
>   have shogun.svrlight = no
>   have shogun = yes
>   have shogun.svmocas = yes
>   have nipy = no
>   have glmnet = no
>   have mass = no
>   have lars = no
>   have shogun.krr = yes
>   have atlas_pymvpa = no
>   have cpickle = yes
>   have mdp = yes
>   have numpy = yes
>   have pylab = yes
>   have rpy2 = no
>   have shogun.lightsvm = no
>   have pywt = yes
>   have skl = no
>   have gzip = yes
>
>
>
>
>
>
>> Date: Tue, 1 Mar 2011 13:38:55 -0500
>> From: michael.hanke at gmail.com
>> To: pkg-exppsy-pymvpa at lists.alioth.debian.org
>> Subject: Re: [pymvpa] (no subject)
>>
>> Hey,
>>
>> On Tue, Mar 01, 2011 at 05:56:43PM +0000, Daniel Agger wrote:
>> >
>> > Dear pymvpa helper
>> >
>> > Im trying to install pymvpa and i start the tutorial, and i run into
>> > this problem.It says nibabel not found,and it requires external
>> > nibabel but i have nibabel in my path. so i don't what to do, please
>> > help.
>>
>> It doesn't look like you have it in the path.
>>
>> > >>> ds = get_haxby2001_data()
>>
>> Can you do a
>>
>> import nibabel
>>
>> right in front of that line. I guess it doesn't work and nibabel is not
>> available.
>>
>> Michael
>>
>> --
>> Michael Hanke
>> http://mih.voxindeserto.de
>>
>> _______________________________________________
>> Pkg-ExpPsy-PyMVPA mailing list
>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>
>



More information about the Pkg-ExpPsy-PyMVPA mailing list