Skip to main content
Pypi Package PyPI - Python Version Github Actions Doc Build Status Github Actions Test Status Coverage Status https://zenodo.org/badge/DOI/10.5281/zenodo.8397156.svg Bluesky YouTube Channel Subscribers Mastodon Discord

nilearn

Nilearn enables approachable and versatile analyses of brain volumes and surfaces. 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 modeling, classification, decoding, or connectivity analysis.

Install

Latest release

1. Setup a virtual environment

We recommend that you install nilearn in a virtual Python environment, either managed with the standard library venv or with conda (see miniconda for instance). Either way, create and activate a new python environment.

With venv:

python3 -m venv /<path_to_new_env>
source /<path_to_new_env>/bin/activate

Windows users should change the last line to \<path_to_new_env>\Scripts\activate.bat in order to activate their virtual environment.

With conda:

conda create -n nilearn python=3.10
conda activate nilearn

2. Install nilearn with pip

Execute the following command in the command prompt / terminal in the proper python environment:

python -m pip install nilearn

If you want to upgrade your current version:

python -m pip install --upgrade nilearn

Nilearn comes with optional plotting dependencies (matplotlib, plotly). If you want to install matplotlib:

python -m pip install 'nilearn[plotting]'

If you want to install matplotlib and plotly:

python -m pip install 'nilearn[plotting, plotly]'

Development version

Please find all development setup instructions in the contribution guide.

Check installation

Try importing nilearn in a python / iPython session:

import nilearn

If no error is raised, you have installed nilearn correctly.

Drop-in Hours

The Nilearn team organizes regular online drop-in hours to answer questions, discuss feature requests, or have any Nilearn-related discussions. Nilearn drop-in hours occur every Wednesday from 4pm to 5pm UTC, and we make sure that at least one member of the core-developer team is available. These events are held on Jitsi Meet and are fully open, anyone is welcome to join! For more information and ways to engage with the Nilearn team see How to get help.

Dependencies

The required dependencies to use the software are listed in the file pyproject.toml.

If you are using nilearn plotting functionalities or running the examples, matplotlib >= 3.8.0 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 >= 6.0.0 and pytest-cov for coverage reporting.

Development

Detailed instructions on how to contribute are available at https://nilearn.github.io/stable/development.html

Metadata

Release files for nilearn 0.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nilearn 0.14.1
File Size Uploaded
nilearn-0.14.1.tar.gz 57.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nilearn 0.14.1
File Interpreter ABI Platform
nilearn-0.14.1-py3-none-any.whl Python 3 none any Details

Total release size: 68.6 MB

Release files / nilearn-0.14.1.tar.gz

Download URL nilearn-0.14.1.tar.gz
Size 57.1 MB
Tags Source
SHA-256 checksum
How to use checksums
6f7ec639be2c9e4a3625ebc4f25c3de31ae3af21331c8d03e27201c482609672
BLAKE2b-256 checksum
How to use checksums
ac10fb546467307bb411c0d8be39a0c17bff2e6d454d7cc5e912b50abf60ab52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.16

Release files / nilearn-0.14.1-py3-none-any.whl

Download URL nilearn-0.14.1-py3-none-any.whl
Size 11.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
725206484e9fb3f6691f9c2d20204a068759d5072f12055324702ee0cb2bbe8a
BLAKE2b-256 checksum
How to use checksums
9e4f6d93620cf4c7f642a8fb85fef8b6e30a24764ef99774026550291dea6fdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.14.1 This release

2 release files

0.13.1

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

1 release file

0.4.0

2 release files

0.3.1

1 release file

0.3.0

1 release file

0.2.6

4 release files

0.2.5

3 release files

0.2.4

3 release files

0.2.3

4 release files

0.2.2

4 release files

0.2.1

3 release files

0.2.0

2 release files

0.1.4

4 release files

0.1.3

3 release files

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page