python-MNE installation

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

hi Tommi,

the problem is that you have 2 python systems installed:
- the system one that uses yum for installs + updates
- canopy

when you did "yum install -y python-pip" you installed pip
for the system and not for canopy. I suspect canopy already
comes with pip installed.

I recommend you uninstall pip with yum and any other python
packages you installed with yum and then make sure you use canopy.

to check this use:

which python

it should point to the canopy folder. If it's the case do the same with pip

which pip

if it points to canopy then you can safely do:

pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev

let us know how it goes.

Alex

Hi Alex,

Thank you, will try. However, as far as I could tell, Canopy does not include pip (following full Canopy installation, attempts to give pip commands just resulted in "command not found" errors until I used the yum command below). Then, the question becomes, how to properly install pip for Canopy?

Best regards,

Tommi

Hi Tommi,

Can you verify that you are actually on bash and not on tcsh or some other
shell when you try the pip command? I think canopy works only on bash.

Mainak

I personally have found Anaconda easier to work with than Canopy, too, if
you want to try that.

Eric

hi Tommi,

Thank you, will try. However, as far as I could tell, Canopy does not
include pip (following full Canopy installation, attempts to give pip
commands just resulted in "command not found" errors until I used the yum
command below). Then, the question becomes, how to properly install pip for
Canopy?

easy_install pip

should do the job. Otherwise use the canopy GUI and the graphical
package manager.

Alex

Hi Alex,

I am not sure the diagnosis is entirely correct.

I first checked that (to my knowledge) I have not installed any other
pythons than Canopy (unless CentOS 6.5 includes a version by default).

Then, I checked that both "which python" and "which pip" already point to
Canopy (I did not do anything to the system yet). Specifically:
which python
/usr/pubsw/packages/python/System/bin/python
which pip
/usr/pubsw/packages/python/System/bin/pip

(Note that when installing Canopy I set it to reside in
/usr/pubsw/packages/python/)

Next, I re-installed (as root) the python mne package just to make sure it
is there:
pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev

However, the errors for
ipython --pylab gt
and
ipython -> import mne

remain exactly the same as before.

If you still believe I need to uninstall the pip I installed with yum, I
would greatly appreciate if you could let me know which command I should
use for uninstallation (I found a ton of different ways, and some of these
will likely mess up the system in more than one way).

Thank you!

Tommi

Hi Mainak,

Thank you for the suggestion. I am using csh and am able to launch ipython
(that I believe is what I installed with Canopy) from the csh terminal. To
make this happen, I just added the following line to my .cshrc:
setenv PATH /usr/pubsw/packages/python/System/bin:${PATH}

I have very little experience in using bash (yes I am a horrible person
:D). In my system I have not been able to launch ipython at all from bash
(perhaps there is something wrong with my ~/.bash_profile ? though I did
try to add a path to the canopy installation). Anyway based on the
following page canopy would appear to ok with both bash and tcsh:
http://wiki.nmr-relax.com/Epd_canopy

Let me know if you still think this might the root of the problem...

I also wonder that since many seem to be using Anaconda instead of Canopy,
if I should move my camp there instead.

Best regards,

Tommi

Eric, thank you for the kind suggestion - this would seem to make sense as
some of the code I am seeing only works with Anaconda. The sole reason I
went with Canopy was because it is the only suggestion offered on the
MNE-python web pages
(http://martinos.org/mne/stable/getting_started.html).

Cheers, Tommi

hi Tommi,

Then, I checked that both "which python" and "which pip" already point to
Canopy (I did not do anything to the system yet). Specifically:
which python
/usr/pubsw/packages/python/System/bin/python
which pip
/usr/pubsw/packages/python/System/bin/pip

good

Next, I re-installed (as root) the python mne package just to make sure it
is there:
pip install -e git+GitHub - mne-tools/mne-python: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python

what did it say? did it complete successfully?

if pip is from canopy and you see no error then typing in (i)python

import mne

should really work.

However, the errors for
ipython --pylab gt
and
ipython -> import mne

remain exactly the same as before.

If you still believe I need to uninstall the pip I installed with yum, I
would greatly appreciate if you could let me know which command I should
use for uninstallation (I found a ton of different ways, and some of these
will likely mess up the system in more than one way).

yum uninstall python-pip

?

don't hesitate to paste error messages.

Alex

PS : we're going to improve the getting started doc...
PS2 : if you really struggle get rid of canopy and give a try to
anaconda installing it in your home folder without root access.

Hi Tommi,

Strange. But your CentOS certainly has a system python by default: many aspects of Linux OS management are built on it.

I'm also on the anaconda wagon these days, but had a go at EPD a while back. There are a bunch of environment variables that need to be set correctly in order for it to work (to prevent it from borking the system python). To debug this, would you please provide the output of

echo $SHELL # CentOS defaults to bash according to docs, have you spawned tcsh in a bash shell?
cat ~/.cshrc

also cat any other csh-scripts (like ~/.cshrc_epd?) that you run prior to issuing the ipython-command.

/Chris

Hi Tommi,

Hi Mainak,

Thank you for the suggestion. I am using csh and am able to launch ipython
(that I believe is what I installed with Canopy) from the csh terminal.

I think what you have is the system default ipython, not the one installed
with Canopy.

To
make this happen, I just added the following line to my .cshrc:
setenv PATH /usr/pubsw/packages/python/System/bin:${PATH}

shouldn't it be something like: ~/Enthought/Canopy_64bit/User/bin ? (see
here:
https://support.enthought.com/entries/23646538-Make-Canopy-User-Python-be-your-default-Python-i-e-on-the-PATH-
)

I have very little experience in using bash (yes I am a horrible person

:D). In my system I have not been able to launch ipython at all from bash
(perhaps there is something wrong with my ~/.bash_profile ? though I did
try to add a path to the canopy installation). Anyway based on the
following page canopy would appear to ok with both bash and tcsh:
http://wiki.nmr-relax.com/Epd_canopy

Yes, but are you actually using the tcsh activation script? I suspect that
the default activation script that comes with canopy is bash. You need to
run the activation script to have your canopy virtual environment set up.
Usually, this is added in the .bashrc or something and it gets executed
every time you start the bash terminal.

The reason I suspect this is the problem is because in your error messages
(from the first email), I don't see the canopy virtual environment which is
strange. Maybe you have disabled the virtual environment prompt? If you
enable it, you should see something like this:
http://docs.enthought.com/canopy/_images/canopy_terminal.png as your prompt
in terminal.

(Canopy 64-bit) ~ tommi$

Let me know if you still think this might the root of the problem...

I also wonder that since many seem to be using Anaconda instead of Canopy,
if I should move my camp there instead.

Yes, I agree. It might be easier. I switched to Anaconda earlier this year
and I found it much easier to use than Canopy.

Mainak

Best regards,

Tommi

> Hi Tommi,
>
> Can you verify that you are actually on bash and not on tcsh or some
other
> shell when you try the pip command? I think canopy works only on bash.
>
> Mainak
>
>
>> Hi Alex,
>>
>> Thank you, will try. However, as far as I could tell, Canopy does not
>> include pip (following full Canopy installation, attempts to give pip
>> commands just resulted in "command not found" errors until I used the
>> yum
>> command below). Then, the question becomes, how to properly install pip
>> for
>> Canopy?
>>
>> Best regards,
>>
>> Tommi
>> ------------------------------
>> From: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
>> Sent: ???9/???30/???2014 2:13 AM
>> To: Discussion and support forum for the users of MNE Software
>> <mne_analysis at nmr.mgh.harvard.edu>
>> Subject: Re: [Mne_analysis] python-MNE installation
>>
>> hi Tommi,
>>
>> the problem is that you have 2 python systems installed:
>> - the system one that uses yum for installs + updates
>> - canopy
>>
>> when you did "yum install -y python-pip" you installed pip
>> for the system and not for canopy. I suspect canopy already
>> comes with pip installed.
>>
>> I recommend you uninstall pip with yum and any other python
>> packages you installed with yum and then make sure you use canopy.
>>
>> to check this use:
>>
>> which python
>>
>> it should point to the canopy folder. If it's the case do the same with
>> pip
>>
>> which pip
>>
>> if it points to canopy then you can safely do:
>>
>> pip install -e git+GitHub - mne-tools/mne-python: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
>>
>> let us know how it goes.
>>
>> Alex
>>
>>
>>
>>
>> >
>> > 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+
GitHub - mne-tools/mne-python: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
>> >
>> > 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]:
>> >
>> >
>> > _______________________________________________
>> > Mne_analysis mailing list
>> > Mne_analysis at nmr.mgh.harvard.edu
>> > Mne_analysis Info Page
>> >
>> >
>> > The information in this e-mail is intended only for the person to whom
>> it is
>> > addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> > contains patient information, please contact the Partners Compliance
>> HelpLine at
>> > MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you
>> in error
>> > but does not contain patient information, please contact the sender
>> and
>> properly
>> > dispose of the e-mail.
>> >
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> Mne_analysis Info Page
>>
>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> Mne_analysis Info Page
>>
>>
>> The information in this e-mail is intended only for the person to whom
>> it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
>> in
>> error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> Mne_analysis Info Page

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141001/ff24b6c9/attachment.html

Hi Alex,

I think this is a path error at multiple levels - installations go one way
and the expected paths in another. I tried to follow your suggestions
(uninstall yum pip > install canopy pip > re-install MNE python) but keep
getting similar/same errors as before. Some observations and questions
(details of terminal commands and feedback at the end):

1. Do I need to cd to a specific directory when I do "easy_install pip" and
"pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev?"
This seems to determine where the "src" dir and paths are set (I did not
see this mentioned in the "getting started" web page - and now after
several installation attempts I see I have a few "src" dirs in different
locations).

2. For cleaning up extra copies (see above), how do I remove spurious mne
python installations? Attempt to "pip uninstall mne-python" at the dirs
where they were installed gives the error:
Cannot uninstall requirement mne-python, not installed
Storing debug log for failure in /root/.pip/pip.log

3. Post installation, where should the user level ~/.cshrc path point? I
now have it at
setenv PATH /usr/pubsw/packages/python/System/bin:${PATH}

4. As one might reasonable expect given the above mess, the good old
errors remain: given from a csh window either as root or as a user, the
command "ipython --pylab qt", and ipython followed by ">>>import mne"
result in the same errors as before.

Cheers,

Tommi

DETAILS:

su root + pw
csh
whoami: root

- uninstall yum-pip <yum remove python-pip> as root. Result: OK

- install Canopy pip <easy_install pip> as root. Result: OK. Details:
[raij at tmsh raij]# easy_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Best match: pip 1.5.6
Downloading
https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e
Processing pip-1.5.6.tar.gz
Running pip-1.5.6/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-HjVeBr/pip-1.5.6/egg-dist-tmp-HRsylX
warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under
directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.5.6 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.6 script to /usr/bin
Installing pip2 script to /usr/bin
Installed /usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg
Processing dependencies for pip
Finished processing dependencies for pip

- re-install MNE-python <pip install -e
git+https://github.com/mne-tools/mne-python#egg=mne-dev> as root. Result
looks OK but for some reason setup.py path points to my home dir even
though I am here as root:

[raij at tmsh raij]# pip install -e
git+https://github.com/mne-tools/mne-python#egg=mne-dev
Obtaining mne from git+https://github.com/mne-tools/mne-python#egg=mne-dev
  Cloning https://github.com/mne-tools/mne-python to ./src/mne
  Running setup.py (path:/home/raij/src/mne/setup.py) egg_info for package
mne
    build_src
    warning: no previously-included files matching '*' found under
directory 'examples/MNE-sample-data'
  Installing extra requirements: 'egg'
Installing collected packages: mne
  Running setup.py develop for mne
    changing mode of build/scripts.linux-x86_64-2.6/mne from 644 to 755
    build_src
    warning: no previously-included files matching '*' found under
directory 'examples/MNE-sample-data'
    Creating /usr/lib/python2.6/site-packages/mne.egg-link (link to .)
    Removing mne 0.9.git from easy-install.pth file
    Adding mne 0.9.git to easy-install.pth file
    Installing mne script to /usr/bin

    Installed /home/raij/src/mne
Successfully installed mne
Cleaning up...

hi Tommi,

1. Do I need to cd to a specific directory when I do "easy_install pip" and
"pip install -e git+GitHub - mne-tools/mne-python: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python;
This seems to determine where the "src" dir and paths are set (I did not
see this mentioned in the "getting started" web page - and now after
several installation attempts I see I have a few "src" dirs in different
locations).

no you can be anywhere

2. For cleaning up extra copies (see above), how do I remove spurious mne
python installations? Attempt to "pip uninstall mne-python" at the dirs
where they were installed gives the error:
Cannot uninstall requirement mne-python, not installed
Storing debug log for failure in /root/.pip/pip.log

use "pip uninstall mne"

"mne" is the name on pypi.

3. Post installation, where should the user level ~/.cshrc path point? I
now have it at
setenv PATH /usr/pubsw/packages/python/System/bin:${PATH}

yes I think.

DETAILS:

su root + pw
csh
whoami: root

- uninstall yum-pip <yum remove python-pip> as root. Result: OK

good

- install Canopy pip <easy_install pip> as root. Result: OK. Details:
[raij at tmsh raij]# easy_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Best match: pip 1.5.6
Downloading
https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e
Processing pip-1.5.6.tar.gz
Running pip-1.5.6/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-HjVeBr/pip-1.5.6/egg-dist-tmp-HRsylX
warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under
directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.5.6 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.6 script to /usr/bin
Installing pip2 script to /usr/bin
Installed /usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg
Processing dependencies for pip
Finished processing dependencies for pip

if you see /usr/lib and not /usr/pubsw/packages/python/System/...
you install on the linux tree and not canopy. That's the problem.
easy_install and canopy seem to install stuff in the wrong place.
You should have everything in the canopy folder.

same thing happens below with pip install mne

if you did not do anywrong and easy_install is the one from canopy
then canopy is buggy and you should give a try to anaconda.

Alex

Hi Alex,

Thank you. Before switching to Anaconda I need to clean up Canopy and the
multiple mne-python installations that got created. However, this appears
to be easier said than done.

First, I do not quite understand why it would not matter in which dir I am
when I do

pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev

Every installation attempt has created a new "src" dir in the specific
directory where I give the command. The contents of the dir "src" are:
- mne (which is a dir containing a MNE-Python installation)
- pip-delete-this-directory.txt

My system now has (at least) 3 copies of the "src" dir in different
locations, corresponding to (at least) 3 installation attempts while being
cd:d in the specific dir (these have different time staps so they were
clearly not created at once):

/home/raij/
/usr/pubsw/packages/
/usr/pubsw/packages/python/System/

There is only one location that has a file called "mne" related to one of
the installation attempts. This is at /home/raij/

Then, to the more relevant business of removing these installations. The
command you suggested

pip uninstall mne

returns the error:

Cannot uninstall requirement mne, not installed
Storing debug log for failure in /root/.pip/pip.log

I also tried to remove "mne-dev" instead of "mne", and tried doing this at
all 3 paths listed above. Same error regardless. Any suggestion why this
might be the case?

Bests,

Tommi

hi Tommi,

remove everything you can (without breaking your system).

Just to give you an idea on my systems i have python related stuff in 2 places:
- anaconda folder that I have in my home : /Users/alex/anaconda
- my user installs (pip with --user param) in
~/.local/lib/python2.7/site-packages/

it means that to remove python from my system I just need to put these
2 folders to trash.

Alex

Hi Alex,

Removing Canopy python should be easy (fingers crossed), but the question
is how I remove mne-python (dev version) - without breaking my system.
Since removing mne with "pip uninstall mne" is not working, can I just
delete all "src" folders and "mne" files I can find? Should I delete
something else as well? Are there any dependencies that should be taken
into account, and if so, how?

Thanks,

Tommi

hi Tommi,

Removing Canopy python should be easy (fingers crossed), but the question
is how I remove mne-python (dev version) - without breaking my system.
Since removing mne with "pip uninstall mne" is not working, can I just
delete all "src" folders and "mne" files I can find?

just remove the folder that are called mne* something.

Should I delete
something else as well? Are there any dependencies that should be taken
into account, and if so, how?

mne does not automatically install any dependency.

Alex

Hi Alex,

Mainly a success! Anaconda installed ok, basic version of mne also
installed ok. However, the developmental mne version does not seem to
install/work properly. Details:

I succesfully installed anaconda as root to all users (one copy at
/usr/pubws/packages/python/anaconda/. After this,
ipython --pylab qt
seemed to work and did not return any errors.

Attempts to install the developmental version of mne continue to be
unsuccesful. The command
pip install -e git+GitHub - mne-tools/mne-python: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
suggested that mne was installed at /usr/pubsw/packages/python/src/mne
However,
ipython --pylab qt

import mne

returned an error package not found (both for root and individual users).

In contrast,
pip install mne --upgrade
installed /usr/pubsw/packages/python/anaconda/bin/mne
ipython --pylab qt

import mne

works (both for root and individual users).

Any suggestions what I am doing wrong with installation of the dev package?

Cheers,

Tommi

hi Tommi,

glad to hear you made progress !

can you paste the output of:

pip install -e git+https://github.com/mne-tools/mne-python#egg=mne-dev

out of curiosity why do you want the development version of the code?
we release every 5 to 6 months and make sure we stay backward
compatible for at least one release. The stable version is also
what is documented on the website.

Alex