Bindings for FLINT
Maintained. Last release 5 months ago, commits in 17 of the last 26 weeks. Weaker on release cadence and contributor spread.
pip install python-flintPython-FLINT
Python extension module wrapping FLINT (Fast Library for Number Theory) and Arb (arbitrary-precision ball arithmetic). Features:
- Integers, rationals, integers mod n
- Real and complex numbers with rigorous error tracking
- Polynomials, power series and matrices over all the above types
- Lots of mathematical functions
Documentation: https://python-flint.readthedocs.io/en/latest/
Repository: https://github.com/flintlib/python-flint/
Author: Fredrik Johansson fredrik.johansson@gmail.com
Installation
Currently python-flint supports CPython versions 3.10-3.14 and 3.14t (free-threaded) and provides binaries on PyPI for the following platforms:
- Windows (x86-64)
- MacOS (x86-64, arm64)
- Linux (manylinux: x86-64, aarch64)
For these platforms python-flint can be installed simply with pip
pip install python-flint
Alternatively python-flint can be installed using conda
conda install -c conda-forge python-flint
Build from source
For other platforms or architectures installation needs to build from source. First install FLINT 3. Starting with python-flint 0.5.0 older versions of Flint such as 2.9 are not supported any more. Note that as of Flint 3 Arb no longer needs to be built separately as it is now merged into Flint.
As of e.g. Ubuntu 24.04 a new enough version of FLINT (at least version 3) can be installed from the Ubuntu repos like
sudo apt-get install libflint-dev
For older distros the version in the repos is too old and a newer version of FLINT needs to be built. See here for instructions on building FLINT:
A script that builds and installs FLINT on Ubuntu can be found here:
The latest release of Python-FLINT can then be built from source and installed using:
pip install --no-binary python-flint python-flint