--- id: nilearn version: "0.14.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # nilearn — Statistical learning for neuroimaging in Python License: permissive · Maintenance: active · Downloads: 287.3K/mo ## What it is and what it does Nilearn is a Python library for statistical and machine-learning analysis of brain imaging data. It integrates scikit-learn's multivariate statistics with neuroimaging-specific tools, supporting general linear model (GLM) analysis on brain volumes and surfaces. The package is designed for researchers and developers working with fMRI, structural imaging, or other neuroimaging modalities who need accessible statistical and predictive modeling capabilities. The library depends on core scientific Python packages (numpy, scipy, pandas, scikit-learn, nibabel) for numerical computation and neuroimaging file handling. It includes optional plotting support via matplotlib and plotly. The project maintains active development with regular releases, comprehensive documentation, and a community-oriented approach including weekly drop-in hours for user support. Use it for: - Perform GLM-based statistical analysis on fMRI data to identify brain regions associated with experimental conditions - Build predictive models for brain decoding tasks using multivariate pattern analysis with scikit-learn integration - Analyze functional connectivity between brain regions and classify brain states from imaging data - Visualize and explore brain volume and surface data with integrated plotting tools - Conduct group-level statistical inference on neuroimaging datasets across multiple subjects ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Nilearn provides statistical and machine-learning tools for analyzing brain imaging data, supporting GLM-based analysis and multivariate statistics via scikit-learn integration. Yes. Nilearn is actively maintained, has low install friction, carries a permissive license, and addresses a specific scientific need with established community support. It is well-suited for researchers and developers doing neuroimaging analysis in Python. No known security vulnerabilities. ## Install pip install nilearn uv add nilearn poetry add nilearn ## Installing nilearn Before you install: Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release 43 days ago and ongoing repository activity. Requires Python 3.10 or later. License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only preservation of copyright and license notices. Quickstart: pip install nilearn import nilearn from nilearn import image # Load and analyze brain imaging data using nilearn's statistical tools Requires Python 3.10 or later. Optional plotting features require matplotlib >= 3.8.0 or plotly + kaleido for advanced visualization. Verify before relying: - Whether the package's GLM analysis and multivariate statistics capabilities cover your specific neuroimaging use case - Performance characteristics when working with large-scale brain imaging datasets - Availability and quality of community support beyond the documented drop-in hours ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 287.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags neuroimaging analysis python, brain imaging statistical learning, fmri data analysis, multivariate brain statistics, neuroimaging machine learning, brain volume surface analysis, glm neuroimaging, neuroimaging, brain-analysis, scientific-computing [View on SkillFed](https://skillfed.io/packages/nilearn) · [View on PyPI](https://pypi.org/project/nilearn/)