Home Installation Demos C++ docs Python docs
Basix can be installed using
pip install .
In the standard install, the C++ library is built and installed inside the Python package. This method is suitable for the majority of use cases.
It is also possible to install the C++ and Python interfaces separately (see below). This is useful if you only need the C++ interface, and can be helpful during development.
cmake -DCMAKE_BUILD_TYPE=Release -B build-dir -S . cmake --build build-dir cmake --install build-dir
You may need to use
sudo for the final install step. Using the CMake
Release is strongly recommended for performance.
After installing the C++ library, install the Python interface by running in
pip install .
Running the unit tests
To install Basix and the extra depedencies required to run the Python unit tests:
pip install .[test]
From the directory
python/ the tests can be run with:
Basix depends on
and LAPACK. CMake will download xtensor if it cannot be found.
When using the standard install approach all build and runtime dependencies for the C++ and Python parts of Basix will be fetched automatically.
Building the Python interface requires
At runtime Basix requires
Basix specifies sets of optional extras
ci for building documentation, linting, enabling optional features, testing
and for continuous integration, respectively, e.g.:
pip install .[docs,lint]