Kiwisolver is a fast implementation of the Cassowary constraint solver, designed to be lightweight and efficient. The current version is 1.5.0, released on March 9, 2026. The library is actively maintained and follows a regular release cadence, with updates approximately every few months.
pip install kiwisolverVerified import paths — ran on the pinned version, not inferred.
A basic example demonstrating how to set up and solve a constraint system using Kiwisolver.
Upgrade your Python installation to version 3.10 or later.
Install the 'cppy' package using pip.
Consult the `kiwisolver` documentation for available methods and correct API usage. Common methods for solving or updating variables include `solve()` or `updateVariables()`.
Download and install the "Build Tools for Visual Studio" from Microsoft's website, ensuring the "Desktop development with C++" workload is selected during installation.
Install the Python development package for your specific Python version using your system's package manager (e.g., `sudo apt-get install python3-dev` on Debian/Ubuntu, or `sudo yum install python3-devel` on CentOS/Fedora).
Install the package using pip: `pip install kiwisolver`, and ensure you are running your script in the correct virtual environment if one was used during installation.