Install Python and MNE-Python

1. Install a Python interpreter

  • For a fast and up to date scientific Python environment, we recommend the Anaconda Python 2.7 distribution. Get it for Windows, OSX, and Linux here.


    Python has two major versions currently available, 2.7+ and 3.3+. Currently 3D visualization is only officially supported on 2.7.

  • Once everything is set up, check the installation:

    $ conda --version
    conda 4.2.14
    $ python --version
    Python 2.7.12 :: Continuum Analytics, Inc.

    If your installation doesn’t look something like this, something went wrong. Try looking through the Anaconda documentation or Googling for Anaconda install tips (StackExchange results are often helpful).

2. Install dependencies and MNE

  • From the command line, install the MNE dependencies to the root Anaconda environment:

    $ conda install scipy matplotlib scikit-learn mayavi jupyter spyder
    $ pip install PySurfer mne

    Try the conda environment available here:

    $ curl -O
    $ conda env create -f environment.yml
    $ source activate mne
  • To check that everything went fine, in Python, type:

    >>> import mne

    If you get a new prompt with no error messages, you should be good to go!

  • For advanced topics like how to get NVIDIA CUDA support or if you’re having trouble, visit Advanced setup and troubleshooting.