Python package
If you wish to use Knitro through its Python interface or by calling it from the modeling framework Pyomo, installing Knitro via its Python package might be the solution most appropriate for your needs.
The knitro package is available on the standard Python repository PyPI (Python Package Index). You can install it using your preferred Python package manager (pip, Poetry, uv, Hatch, PDM, Rye …). It contains the Knitro binaries as well as the Python interface.
In order to use Knitro, you will need a valid license. If you do not yet have one,
please visit http://www.artelys.com/knitro in order to obtain a trial license and
start using Knitro. The simplest way to ensure your license is recognized is to place
the license file in the appropriate folder: C:\Program Files\Artelys
on Windows, and
the $HOME
directory on Unix systems (e.g. Linux, MacOS).
In a Python environment which has the knitro package installed,
you can either use Knitro through its Python interface
(by including import knitro
in your Python code),
or call the solver from Pyomo with SolverFactory("knitroampl")
.