Releases of scikit-umfpack can be installed from source using
pip, or with
a package manager like
conda . To install from source, first ensure the
dependencies described in the next section are installed, then run:
pip install scikit-umfpack
To install scikit-umfpack from its source code directory, run in the root of a clone of the Git repository:
pip install .
scikit-umfpack depends on NumPy, SciPy, and SuiteSparse.
To build scikit-umfpack, the following are needed: - a C compiler - a BLAS library with CBLAS symbols (e.g., OpenBLAS, Accelerate on macOS, or reference BLAS) - NumPy - SuiteSparse (which contains UMFPACK) - SWIG
pkg-config is an optional dependency, if it’s installed it may be used to detect a BLAS library.
SuiteSparse cannot be installed from PyPI, however it will likely be available from your package manager of choice. E.g., installing on Ubuntu 22.04 can be achieved with:
sudo apt-get install libsuitesparse-dev
or from Conda-forge on any supported OS with:
conda install suitesparse
SuiteSparse can also be built from source, see the instructions in the README of the SuiteSparse repository.
Detection of UMFPACK¶
During the build, scikit-umfpack tries to automatically detect the UMFPACK shared library and headers. In case SuiteSparse is installed in a non-standard location, this autodetection may fail. If that happens, it is possible to provide the paths to the library and include directories in a config file (a Meson machine file). This file should contain absolute paths. For example, for a conda env on Windows, it may look like:
[properties] umfpack-libdir = 'C:\Users\micromamba\envs\scikit-umfpack-dev\Library\lib' umfpack-includedir = 'C:\Users\micromamba\envs\scikit-umfpack-dev\Library\include\suitesparse'
If that file is named
nativefile.ini, then the
pip invocation should
look like (note that
$PWD ensures an absolute path to the native file is
pip install . -Csetup-args=--native-file=$PWD/nativefile.ini