[pymvpa] problem installing PyMVPA on ubuntu

Scott Gorlin gorlins at MIT.EDU
Tue Apr 21 23:58:44 UTC 2009


shoot, the api changed since that hack.

try instead:

from mvpa.base import cfg
cfg.set('externals', 'have shogun', 'no')

from mvpa.suite import *

wrt those things like lapack, i'm not too clear on these things, but i 
believe they are supposed to be optional dependencies which speed things 
up.  i just installed all of them until everything in the shogun 
installer said yes.

i think that RPy thing is a bug induced by you changing _KNOWN, I don't 
think there's any reason you need R

ps please forward all responses to the mailing list, so others may glean 
wisdom from our proceedings ;)

Greg Detre wrote:
>  hey scott,
>
> thanks for your help.
>
> > i wonder if shogun is installed correctly.  looking closer at your
> > error, looks like it's looking for a lapack library.  have you
> > installed lapack and all those goodies?
>
> i haven't explicitly installed LAPACK or anything like that. i figured
> those dependencies would have been taken care of by the package 
> manager...
>
> it looks like i have:
>
>   libblas3gf
>   libblas-dev
>   liblapack3gf
>
> but i don't have:
>
>   libatlas3gf-base
>   libatlas-base-dev
>   liblapack-dev
>   lapack3 (seems to be dud)
>   scalapack-*
>
> > if you need shogun, i'd highly recommend installing the version from
> >  shogun-toolbox.org, which is many versions newer than ubuntu's.
> > that should also take care of any dependencies it requires like
> > lapack.
> >
> > do the libsvm backend classifiers work?  if not then it may be that
> > your libsvm installation didn't take for some reason, which is why
> > it's trying to import from shogun (can't recall off the top of my
> > head whether mvpa.suite will import the shogun libraries if libsvm
> > isn't installed).
>
> i'm new to this and don't know how to test those classifiers. just to 
> reiterate, it fails when i run:
>
>   from mvpa.suite import *
>
> i can perhaps try those libsvm classifiers with per tomorrow if it's 
> going to be really diagnostic.
>
> > there's also a workaround to prevent loading shogun even if it's
> > installed.  you shouldn't have needed this unless you actually had it
> >  installed previously, so I'm a bit confused why you're getting this
> >  error.   however, prior to importing suite, try this:
> >
> > import mvpa.base.externals mvpa.base.externals._VERIFIED['shogun'] =
> > False
> >
> > from mvpa.suite import *
>
> you mentioned mvpa.base.externals._VERIFIED, but i don't seem to have
> that. so instead, i tried _KNOWN. i don't know if that's what you had
> meant. see the error below.
>
> g
>
> p.s. i'm only borrowing the machine from someone else, so i'd prefer 
> not to install RPy on it, since aptitude seems to want to upgrade all 
> kinds of other packages in order to do so. however, i can probably 
> install RPy tomorrow if that's necessary.
>
>
> In [3]: mvpa.base.externals._KNOWN
> Out[3]:
> {'atlas_fsl': "__check_atlas_family('fsl')",
>  'atlas_pymvpa': "__check_atlas_family('pymvpa')",
>  'cPickle': 'import cPickle as __',
>  'ctypes': 'import ctypes as __',
>  'good scipy.stats.rdist': '__check_stablerdist()',
>  'griddata': 'import griddata as __',
>  'gzip': 'import gzip as __',
>  'hcluster': 'import hcluster as __',
>  'lars': "import rpy; rpy.r.library('lars')",
>  'libsvm': 'import mvpa.clfs.libsvmc._svm as __; x=__.convert2SVMNode',
>  'libsvm verbosity control': '__check_libsvm_verbosity_control();',
>  'lxml': 'from lxml import objectify as __',
>  'matplotlib': '__check_matplotlib()',
>  'mdp': 'import mdp as __',
>  'nifti': 'from nifti import NiftiImage as __',
>  'nifti >= 0.20090205.1': 'from nifti.clib import detachDataFromImage as
> __',
>  'openopt': 'import scikits.openopt as __',
>  'pylab': '__check_pylab()',
>  'pylab plottable': '__check_pylab_plottable()',
>  'pywt': 'import pywt as __',
>  'pywt wp reconstruct': "__check_pywt(['wp reconstruct'])",
>  'pywt wp reconstruct fixed': "__check_pywt(['wp reconstruct fixed'])",
>  'rpy': 'import rpy as __',
>  'running ipython env': '__check_in_ipython()',
>  'scipy': 'import scipy as __',
>  'sg >= 0.6.4': '__check_shogun(3318)',
>  'sg_fixedcachesize': '__check_shogun(3043, [2456])',
>  'shogun': 'import shogun as __',
>  'shogun.lightsvm': 'import shogun.Classifier as __; x=__.SVMLight',
>  'shogun.mpd': 'import shogun.Classifier as __; x=__.MPDSVM',
>  'shogun.svrlight': 'from shogun.Regression import SVRLight as __',
>  'weave': '__check_weave()'}
>
> In [4]: mvpa.base.externals._KNOWN['shogun'] = False
>
> In [5]: from mvpa.suite import *
> --------------------------------------------------------------------------- 
>
> AttributeError                            Traceback (most recent call 
> last)
>
> /qbert/home/greg/<ipython console> in <module>()
>
> /var/lib/python-support/python2.5/mvpa/suite.py in <module>()
>      43 from mvpa.clfs.stats import *
>      44 if externals.exists('libsvm') or externals.exists('shogun'):
> ---> 45     from mvpa.clfs.svm import *
>      46 from mvpa.clfs.transerror import *
>      47 from mvpa.clfs.warehouse import *
>
> /var/lib/python-support/python2.5/mvpa/clfs/svm.py in <module>()
>      51     debug('SVM', 'Default SVM backend is %s' % default_backend)
>      52
> ---> 53 if externals.exists('shogun'):
>      54     from mvpa.clfs import sg
>      55     SVM = sg.SVM
>
> /var/lib/python-support/python2.5/mvpa/base/externals.pyc in exists(dep,
> force, raiseException, issueWarning)
>     283         # importing RPy also involved starting a full-blown R
> session, which can
>     284         # take seconds and therefore is quite nasty...
> --> 285         if dep.count('rpy') or _KNOWN[dep].count('rpy'):
>     286             try:
>     287                 from rpy import RException
>
> AttributeError: 'bool' object has no attribute 'count'
>
>



More information about the Pkg-ExpPsy-PyMVPA mailing list