• Windows
  • Mac
  • Linux
  • Get source
  • First: download and install 64 bit Anaconda

    We recommend that you install a complete 64 bit scientific Python distribution like Anaconda . Since it meets all the requirements of nilearn, it will save you time and trouble. You could also check PythonXY as an alternative.

    Nilearn requires a Python installation and the following dependencies: ipython, scipy, scikit-learn, joblib, matplotlib, nibabel and pandas.

    Second: open a Command Prompt

    (Press "Win-R", type "cmd" and press "Enter". This will open the program cmd.exe, which is the command prompt)
    Then type the following line and press "Enter"

    pip install -U --user nilearn

    Third: open IPython

    (You can open it by writing "ipython" in the command prompt and pressing "Enter")
    Then type in the following line and press "Enter":

    In [1]: import nilearn

    If no error occurs, you have installed nilearn correctly.

  • First: download and install 64 bit Anaconda

    We recommend that you install a complete 64 bit scientific Python distribution like Anaconda. Since it meets all the requirements of nilearn, it will save you time and trouble.

    Nilearn requires a Python installation and the following dependencies: ipython, scipy, scikit-learn, joblib, matplotlib, nibabel and pandas.

    Second: open a Terminal

    (Navigate to /Applications/Utilities and double-click on Terminal)
    Then type the following line and press "Enter"

    pip install -U --user nilearn

    Third: open IPython

    (You can open it by writing "ipython" in the terminal and pressing "Enter")
    Then type in the following line and press "Enter":

    In [1]: import nilearn

    If no error occurs, you have installed nilearn correctly.

  • If you are using Ubuntu or Debian and you have access to Neurodebian, then simply install the python-nilearn package through Neurodebian.

    First: Install dependencies

    Install or ask your system administrator to install the following packages using the distribution package manager: ipython , scipy, scikit-learn (sometimes called sklearn, or python-sklearn), joblib, matplotlib (sometimes called python-matplotlib), nibabel (sometimes called python-nibabel) and pandas (sometimes called python-pandas).

    If you do not have access to the package manager we recommend that you install a complete 64 bit scientific Python distribution like Anaconda. Since it meets all the requirements of nilearn, it will save you time and trouble.

    Second: open a Terminal

    (Press ctrl+alt+t and a Terminal console will pop up)
    Then type the following line and press "Enter"

    pip install -U --user nilearn

    Third: open IPython

    (You can open it by writing "ipython" in the terminal and pressing "Enter")
    Then type in the following line and press "Enter":

    In [1]: import nilearn

    If no error occurs, you have installed nilearn correctly.

  • To Install the development version:

    Use git as an alternative to using pip, to get the latest nilearn version

    Simply run the following command (as a shell command, not a Python command):

    git clone https://github.com/nilearn/nilearn.git

    In the future, you can readily update your copy of nilearn by executing “git pull” in the nilearn root directory (as a shell command).

    If you really do not want to use git, you may still download the latest development snapshot from the following link (unziping required): https://github.com/nilearn/nilearn/archive/master.zip

    Install in the nilearn directory created by the previous steps, run (again, as a shell command):

    python setup.py develop --user

    Now to test everything is set up correctly, open IPython and type in the following line:

    In [1]: import nilearn

    If no error occurs, you have installed nilearn correctly.