[Mne_analysis] python-MNE installation

raij at nmr.mgh.harvard.edu raij at nmr.mgh.harvard.edu
Mon Sep 29 17:50:10 EDT 2014
Search archives:

Hi,

New python (and longtime MNE) user here, hello to all.

I am having trouble installing MNE-python on a linux box outside Martinos
Center. The machine (Dell Precision T7500)) runs CentOS 6.5 and has
Freesurfer (5.3), MNE suite (developmental), and MATLAB installed - these
are running no prob.

I am doing installation as root on a csh terminal.

I have tried to follow the instructions at
http://martinos.org/mne/stable/getting_started.html as follows:

1. Install Canopy python. When launcing for the first time, I set up the
environment to point to /usr/pubsw/packages/python/, then make Canopy as
the default python. Version: canopy-1.4.1-full-rh5-64.sh

2. Install pip (this did not exist on my system):
yum install -y python-pip

3. Install developmental MNE-python suite
pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev

Then I open a new csh terminal as a regular user, and
4. Add the following line to my user-level ~/.cshrc:
setenv PATH /usr/pubsw/packages/python/User/bin:${PATH}

Next, I launch a fresh csh terminal, and launch ipython. This appears (?)
to work OK:

tmsh:raij[55] ipython

Python 2.7.6 | 64-bit | (default, Jun  4 2014, 16:32:15)
Type "copyright", "credits" or "license" for more information.

IPython 2.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]:




However, trying to follow the instructions:

ipython --pylab qt

produces a long list of errors suggesting that matplotlib (that I did not
see mentioned in the MNE-python guide - is it needed and how is it best
installed to avoid breaking dependencies?) may not be installed.

Moreover, regardless of if I launch ipython alone or with --pylab qt,
trying to "import mne" gives the error "No module named mne". See the end
of message for the full error list.

Any suggestions would be much appreciated!

Best regards,

Tommi


---
Tommi Raij, MD, PhD
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
Bldg 149, 13th St
Charlestown, MA 02129
U.S.A.


ERROR OUTPUT FOR

ipython --pylab qt (from a csh terminal)

Python 2.7.6 | 64-bit | (default, Jun  4 2014, 16:32:15)
Type "copyright", "credits" or "license" for more information.

IPython 2.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | Eventloop or matplotlib integration failed.
Is matplotlib installed?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/usr/pubsw/packages/python/User/lib/python2.7/site-packages/IPython/core/shellapp.pyc
in <lambda>(key)
    231         shell = self.shell
    232         if self.pylab:
--> 233             enable = lambda key: shell.enable_pylab(key,
import_all=self.pylab_import_all)
    234             key = self.pylab
    235         elif self.matplotlib:

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
in enable_pylab(self, gui, import_all, welcome_message)
   2980         from IPython.core.pylabtools import import_pylab
   2981
-> 2982         gui, backend = self.enable_matplotlib(gui)
   2983
   2984         # We want to prevent the loading of pylab to pollute the
user's

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
in enable_matplotlib(self, gui)
   2941                 gui, backend =
pt.find_gui_and_backend(self.pylab_gui_select)
   2942
-> 2943         pt.activate_matplotlib(backend)
   2944         pt.configure_inline_support(self, backend)
   2945

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/IPython/core/pylabtools.pyc
in activate_matplotlib(backend)
    285     matplotlib.rcParams['backend'] = backend
    286
--> 287     import matplotlib.pyplot
    288     matplotlib.pyplot.switch_backend(backend)
    289

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/matplotlib/pyplot.py
in <module>()
     22
     23 import matplotlib
---> 24 import matplotlib.colorbar
     25 from matplotlib import _pylab_helpers, interactive
     26 from matplotlib.cbook import dedent, silent_list, is_string_like,
is_numlike

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/matplotlib/colorbar.py
in <module>()
     27 import matplotlib.artist as martist
     28 import matplotlib.cbook as cbook
---> 29 import matplotlib.collections as collections
     30 import matplotlib.colors as colors
     31 import matplotlib.contour as contour

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/matplotlib/collections.py
in <module>()
     21 import matplotlib.artist as artist
     22 from matplotlib.artist import allow_rasterization
---> 23 import matplotlib.backend_bases as backend_bases
     24 import matplotlib.path as mpath
     25 from matplotlib import _path

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/matplotlib/backend_bases.py
in <module>()
     48
     49 import matplotlib.tight_bbox as tight_bbox
---> 50 import matplotlib.textpath as textpath
     51 from matplotlib.path import Path
     52 from matplotlib.cbook import mplDeprecation

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/matplotlib/textpath.py
in <module>()
      9 from matplotlib.path import Path
     10 from matplotlib import rcParams
---> 11 import matplotlib.font_manager as font_manager
     12 from matplotlib.ft2font import FT2Font, KERNING_DEFAULT,
LOAD_NO_HINTING
     13 from matplotlib.ft2font import LOAD_TARGET_LIGHT

/usr/pubsw/packages/python/User/lib/python2.7/site-packages/matplotlib/font_manager.py
in <module>()
     51 import matplotlib
     52 from matplotlib import afm
---> 53 from matplotlib import ft2font
     54 from matplotlib import rcParams, get_cachedir
     55 from matplotlib.cbook import is_string_like

ImportError: libpng16.so.16: cannot open shared object file: No such file
or directory



Inside python, the attempt to import MNE gives this error:

In [1]: import mne
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-39fc8b1a8697> in <module>()
----> 1 import mne

ImportError: No module named mne

In [2]:





More information about the Mne_analysis mailing list