Skip to main content

Statistical learning for neuroimaging in Python

Project description

Pypi Package PyPI - Python Version Github Actions Build Status Coverage Status Azure Build Status


Nilearn enables approachable and versatile analyses of brain volumes. It provides statistical and machine-learning tools, with instructive documentation & friendly community.

It supports general linear model (GLM) based analysis and leverages the scikit-learn Python toolbox for multivariate statistics with applications such as predictive modelling, classification, decoding, or connectivity analysis.

Office Hours

The nilearn team organizes regular online office hours to answer questions, discuss feature requests, or have any Nilearn-related discussions. We try to maintain a frequency of one hour every two weeks, usually on Mondays, and make sure that at least one member of the core-developer team is available. These events are held on our on Discord server and are fully open, anyone is welcome to join!

You can check when the next office hours will be held on the Nilearn’s website landing page.


The required dependencies to use the software are:

  • Python >= 3.6,
  • setuptools
  • Numpy >= 1.16
  • SciPy >= 1.2
  • Scikit-learn >= 0.21
  • Joblib >= 0.12
  • Nibabel >= 2.5
  • Pandas >= 0.24

If you are using nilearn plotting functionalities or running the examples, matplotlib >= 1.5.1 is required.

Some plotting functions in Nilearn support both matplotlib and plotly as plotting engines. In order to use the plotly engine in these functions, you will need to install both plotly and kaleido, which can both be installed with pip and anaconda.

If you want to run the tests, you need pytest >= 3.9 and pytest-cov for coverage reporting.


First make sure you have installed all the dependencies listed above. Then you can install nilearn by running the following command in a command prompt:

pip install -U --user nilearn

More detailed instructions are available at


Detailed instructions on how to contribute are available at

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nilearn, version 0.8.1
Filename, size File type Python version Upload date Hashes
Filename, size nilearn-0.8.1.tar.gz (12.6 MB) File type Source Python version None Upload date Hashes View
Filename, size nilearn-0.8.1-py3-none-any.whl (10.0 MB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page