NOTE:
This is the README for the development version of scikit-sparse. For the stable version, see the GitHub repository, and the stable docs.
The scikit-sparse package is a companion to the scipy.sparse package for sparse matrix manipulation in Python. It provides
routines that are not suitable for inclusion in scipy.sparse
proper, typically because they depend on external libraries with
GPL licenses, such as SuiteSparse.
For more details on usage see the docs.
Installing scikit-sparse requires:
- Python >= 3.10
- NumPy >= 2.0
- SciPy >= 1.14
- Cython >= 3.0
- SuiteSparse >= 7.4.0
Older versions may work but are untested.
To install scikit-sparse, you need to have the SuiteSparse library installed on your system.
It is recommended that you install SuiteSparse and the scikit-sparse dependencies in a virtual environment, to avoid conflicts with other packages. We recommend using Anaconda:
$ conda create -n scikit-sparse python>=3.10 suitesparse $ conda activate scikit-sparse
If you are not using Anaconda, you can install SuiteSparse using your preferred package manager.
On MacOS, you can use Homebrew:
$ brew install suite-sparse
On Debian/Ubuntu systems, use the following command:
$ sudo apt-get install python-scipy libsuitesparse-dev
On Arch Linux, run:
$ sudo pacman -S suitesparse
Once you have SuiteSparse installed, you can install scikit-sparse with:
$ conda install -c conda-forge scikit-sparse-dev
or if you prefer to use pip, you can install it with:
$ pip install scikit-sparse-dev
Check if the installation was successful by running the following command:
$ python -c "import sksparse; print(sksparse.__version__)"
See Troubleshooting for more information on determining which SuiteSparse library is being used.
Copyright © 2009–2025, the scikit-sparse developers.