iminuit works with Python 2.7 as well as 3.4 or later.


Like most Python packages, iminuit installation requires setuptools.

The following dependencies are optional:

  • numpy
  • ipython
  • matplotlib
  • pytest, pytest-cov
  • Cython
  • Sphinx, sphinx-rtd

TODO: describe better where which dependency is used.

Stable version

To install the latest stable version:

$ pip install iminuit


Conda packages for iminuit are available via the astropy channel at

$ conda install -c astropy iminuit


For Windows, Christoph Gohlke made a nice windows binary to save you all from Windows compilation nightmare:

Development version

To install the latest development version clone the repository from Github:

$ git clone
$ cd iminuit
$ python install


You will need sphinx and sphinx_rtd_theme. They can be installed via

$ pip install sphinx
$ pip install sphinx_rtd_theme

To generate html docs locally, iminuit has to be available. To check if that is the case, and which version you’re using, you can use this command:

$ python -c 'import iminuit; print(iminuit)'

One way to achieve this is to do this:

$ python build_ext --inplace
$ python develop

Another is to just install iminuit into site-packages:

$ python install

Once you have iminuit available, use these commands to build the docs:

$ cd doc
$ make html

The HTML output is here:

$ open _build/html/index.html


To run the tests you need to install pytest.

To run the iminuit tests for an installed version of the package:

python -m pytest --pyargs iminuit

To run the tests from the source folder (e.g. during pytest development), use this command:

$ make test

To get a coverage report from the tests:

$ make coverage