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.
Important links
Official source code repo: https://github.com/nilearn/nilearn/
HTML documentation (stable release): https://nilearn.github.io/
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nilearn-0.14.1.tar.gz | 57.1 MB | Without provenance | Details for nilearn-0.14.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nilearn-0.14.1-py3-none-any.whl | Python 3 | none | any | Details for nilearn-0.14.1-py3-none-any.whl |
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
|
Security for nilearn 0.14.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.