[Tutor] pyMVPA and OSError
Evert Rol
evert.rol at gmail.com
Tue Sep 28 15:16:47 CEST 2010
Hi,
> I am very much new to python, and thus I am likely to feel stupid about asking. But I need to get past this to continue with my work.
> I need pyMVPA module to run some analysis on fMRI data, but as a start I want to at first play around with the sample data provided on pyMVPA website. I have downloaded Python2.6, my operating system is Mac Leopard (i get a depracation warning when I try to >>> import mvpa,
What depracation warning?
> which is not the problem, however, when I attempt to use the following line
> >>> import mvpa.suite as mvpa
I wouldn't do that; just seems prone to lead to confusion. Perhaps:
>>> import mvpa.suite as mvpas
or
>>> from mvpa import suite
> which i assume to mean the same thing,
It normally doesn't mean the same thing. mvpa and mvpa.suite would normally be quite different things. But perhaps this is how the package is setup; that would be in the manual.
More after the traceback.
> I dont get deprecation warning, but I do get a bunch of errors as follows:
> >>> import mvpa.suite as mvpa
>
> Traceback (most recent call last):
> File "<pyshell#14>", line 1, in <module>
> import mvpa.suite as mvpa
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/suite.py", line 38, in <module>
> from mvpa.algorithms.cvtranserror import *
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/algorithms/cvtranserror.py", line 15, in <module>
> from mvpa.measures.base import DatasetMeasure
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/measures/base.py", line 31, in <module>
> from mvpa.clfs.stats import autoNullDist
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/clfs/stats.py", line 772, in <module>
> if externals.exists('pylab'):
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/base/externals.py", line 432, in exists
> exec _KNOWN[dep]
> File "<string>", line 1, in <module>
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mvpa/base/externals.py", line 249, in __check_pylab
> import pylab as P
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylab.py", line 1, in <module>
> from matplotlib.pylab import *
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pylab.py", line 206, in <module>
> from matplotlib import mpl # pulls in most modules
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl.py", line 2, in <module>
> from matplotlib import axis
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axis.py", line 10, in <module>
> import matplotlib.font_manager as font_manager
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 1297, in <module>
> _rebuild()
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 1288, in _rebuild
> fontManager = FontManager()
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 980, in __init__
> self.ttffiles = findSystemFonts(paths) + findSystemFonts()
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 337, in findSystemFonts
> for f in get_fontconfig_fonts(fontext):
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 298, in get_fontconfig_fonts
> pipe = subprocess.Popen(['fc-list', '', 'file'], stdout=subprocess.PIPE)
At first read, it looks like mvpa is checking for external dependencies, including checking for fonts to be used by matplotlib (or actually, matplotlib does this).
Matplotlib then tries to run an external process called 'fc-list', which presumably list the font-config fonts.
It looks like your system does not have this installed.
Since this is all installed through matplotlib, that would mean that somewhere there is a dependency check missing.
For a start, you could try and reinstall matplotlib yourself, hoping this solves it. But I won't guarantee that.
Since this all done through macports, I wonder what your python is: did you install that through matplotlib as well, or are you using a different (system) python?
You mention you downloaded Python 2.6, which would suggest you're not using macports python, which may cause these errors as well.
In addition, if you are on Snow Leopard (not plain Leopard), you should have Python 2.6 as the system python, which would be a different python again (and a bit out of date).
So, check which python you're using and see if that's macports python.
Good luck,
Evert
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 621, in __init__
> errread, errwrite)
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1126, in _execute_child
> raise child_exception
> OSError: [Errno 2] No such file or directory
>
> -----
>
> I am not sure why OSError is popping and I am sure I am doing something wrong, I just do not know enough to pinpoint what exactly.
>
> Any feedback is appreciated. And I do once more apologize for asking very stupid questions.
More information about the Tutor
mailing list