|
Bertini 2 15aec06 (2026-07-13 04:02 UTC)
Numerical algebraic geometry library (C++ core)
|
The solution of arbitrary polynomial systems is an area of active research, and has many applications in math, science and engineering. This software, Bertini 2, is a re-implementation of Bertini 1 from C into C++/Python.
The theoretical basis for the solution of polynomials with Bertini is a theorem which bounds the number of solutions a system may have. It sits together with the numerical computational tool of "homotopy continuation". the act of "continuing" from one system into another through a "homotopy", as depicted in the below diagram:

Bertini 2 has already implemented most of the foundations of Numerical Algebraic Geometry. Development is ongoing, and here's what we have so far:
See the published docs for latest the officially released documentation (which will always lag behind the doc from the dev version).
✨ In-progress!!!
Users wanting a more stable implementation are recommended to use Bertini 1 or homotopycontinuation.jl, or one of the other packages implementing the theory.
The Python package bertini2 provides pre-built wheels for Linux, macOS, and Windows.
Once it's installed, you import bertini (not import bertini2!)
Installing the wheel also puts the classic blackbox command-line solver on your PATH as bertini2 (threads-only – run bertini2 --help). For MPI / multi-rank cluster parallelism, build the CLI from source.
Please see the Wiki compiling section for instructions on compiling Bertini 2.
The classic blackbox CLI (bertini2 input, with a CONFIG/INPUT file) is a pure C++ program – it does not depend on Python – and every build path delivers it:
| You want... | Do this | You get |
|---|---|---|
| The easy way (threads-only) | pip install bertini2 | bertini2 on PATH + the bertini Python package |
| From source, with Python | pip install . (in a clone) | same as the wheel, built locally |
| From source, with Python, editable | pip install -e . | bertini2 resolves to the in-tree build |
| Just the solver, no Python | cmake -B build -S . && cmake --build build --target bertini2_exe && cmake --install build --component cli --prefix <prefix> | only <prefix>/bin/bertini2 |
| Full C++ dev install | cmake --install build | bin/bertini2 + libbertini2 + headers |
A plain cmake build skips the Python bindings (BUILD_PYTHON_BINDINGS is off by default), so the CLI-only path never needs a Python interpreter. The binary statically links our code but still needs the usual shared libraries on the system (Boost, GMP, MPFR, MPC, and MPI for multi-rank runs) – the wheel vendors these; a from-source build expects them present (e.g. via your HPC modules or a conda env). The wheel CLI is threads-only; for MPI / multi-rank cluster parallelism, build from source.
The official project repository is hosted on GitHub at github.com/bertiniteam/b2.
Please note that this is a long-term project, and is under active development. If you want to help, please see the wiki for contact information. We have opportinuties for all skill levels and interests.
Bertini 2 is Free and Open Source Software. Source is available under GPL Version 3, with additional terms as permitted under Section 7.
A huge thank you to:
And to all the other people who have contributed to this package over the years.