Skip to content

Sparse matrix tools extending scipy.sparse, but with incompatible licenses

License

broesler/scikit-sparse

 
 

Repository files navigation

Latest GitHub release Latest PyPI release Latest conda-forge release CI Status https://readthedocs.org/projects/scikit-sparse-dev/badge/?version=latest

Scikit-Sparse (sksparse)

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.

Requirements

Installing scikit-sparse requires:

Older versions may work but are untested.

Installation

Installing SuiteSparse

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

Installing Scikit-Sparse

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.

About

Sparse matrix tools extending scipy.sparse, but with incompatible licenses

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Cython 68.2%
  • Python 31.8%