Installation and Credits

Download and Installation

The uncertainties package supports Python versions 3.8 and higher. Earlier versions of Python are not tested, but may still work. Development version of Python (currently, 3.13) are likely to work, but are not regularly tested.

To install uncertainties, use:

pip install uncertainties

You can upgrade from an older version of uncertainties with:

pip install --upgrade uncertainties

Other packaging systems such as Anaconda, MacPorts, or Linux package manager may also maintain packages for uncertainties, so that you may also be able to install using something like

conda install -c conda-forge uncertainties
sudo port install py**-uncertainties

or

sudo apt get python-uncertainties

depending on your platform and installation of Python. For all installations of Python, using pip should work and is therefore recommended.

Source code and Development Version

You can download the latest source package archive from the Python Package Index (PyPI) and unpack it, or from the GitHub releases page. This package can be unpacked using unzip, tar xf , or other similar utilities, and then installed with

python -m pip install .

To work with the development version, use git to fork or clone the code:

git clone git@github.com:lmfit/uncertainties.git

The uncertainties package is written in pure Python and has no external dependencies. If available (and recommended), the NumPy package can be used. Running the test suite requires pytest and pytest_cov, and building these docs requires sphinx. To install these optional packages, use one of:

pip install ".[arrays]"    # to install numpy
pip install ".[test]"      # to enable running the tests
pip install ".[doc]"       # to enable building the docs
pip install ".[all]"       # to enable all of these options

Getting Help

If you have questions about uncertainties or run into trouble, use the GitHub Discussions page. For bug reports, use the GitHub Issues pages.

Credits

The uncertainties package was written and developed by Eric O. LEBIGOT (EOL). EOL also maintained the package until 2024, when the GitHub project was moved to the lmfit GitHub organization to allow more sustainable development and maintenance. Current members of the devlopment and maintenance team include Andrew G Savage, Justin Gerber, Eric O Legibot, Matt Newville, and Will Shanks. Contributions and suggestions for development are welcome.

How to cite this package

If you use this package for a publication, please cite it as Uncertainties: a Python package for calculations with uncertainties, Eric O. LEBIGOT. A version number can be added, but is optional.

Acknowledgments

Eric O. LEBIGOT (EOL) thanks all the people who made generous donations: that help to keep this project alive by providing positive feedback.

EOL greatly appreciates having gotten key technical input from Arnaud Delobelle, Pierre Cladé, and Sebastian Walter. Patches by Pierre Cladé, Tim Head, José Sabater Montes, Martijn Pieters, Ram Rachum, Christoph Deil, Gabi Davar, Roman Yurchak and Paul Romano are gratefully acknowledged.

EOL also thanks users who contributed with feedback and suggestions, which greatly helped improve this program: Joaquin Abian, Jason Moore, Martin Lutz, Víctor Terrón, Matt Newville, Matthew Peel, Don Peterson, Mika Pflueger, Albert Puig, Abraham Lee, Arian Sanusi, Martin Laloux, Jonathan Whitmore, Federico Vaggi, Marco A. Ferra, Hernan Grecco, David Zwicker, James Hester, Andrew Nelson, and many others.

EOL is grateful to the Anaconda, macOS and Linux distribution maintainers of this package (Jonathan Stickel, David Paleino, Federico Ceratto, Roberto Colistete Jr, Filipe Pires Alvarenga Fernandes, and Felix Yan) and also to Gabi Davar and Pierre Raybaut for including it in Python(x,y) and to Christoph Gohlke for including it in his Base distribution of scientific Python packages for Windows.

License

This software is released under the Revised BSD License (© 2010–2024, Eric O. LEBIGOT [EOL]).