Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc says "no dependencies", but Measurements need external package "uncertainties" #734

Closed
Tigraan opened this issue Nov 9, 2018 · 1 comment

Comments

@Tigraan
Copy link

Tigraan commented Nov 9, 2018

The "Using measurements" section of the doc does not mention any dependency, and the readme promises

[pint] runs in Python 2.7 and 3.3+ with no other dependency.

Yet in Python 3.5 (most code taken from the docs) :

>>> import pint
>>> pint.__version__
'0.8.1'
>>> import numpy as np
>>> ureg = pint.UnitRegistry()
>>> book_length = (20. * ureg.centimeter).plus_minus(2.)
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    book_length = (20. * ureg.centimeter).plus_minus(2.)
  File "(...)\AppData\Local\Programs\Python\Python35\lib\site-packages\pint\quantity.py", line 1467, in plus_minus
    return self._REGISTRY.Measurement(copy.copy(self.magnitude), error, self._units)
  File "(...)\AppData\Local\Programs\Python\Python35\lib\site-packages\pint\measurement.py", line 136, in __init__
    raise RuntimeError("Pint requires the 'uncertainties' package to create a Measurement object.")
RuntimeError: Pint requires the 'uncertainties' package to create a Measurement object.

Shouldn't the dependency be mentioned at least in the relevant section?

@jules-ch
Copy link
Collaborator

jules-ch commented Mar 2, 2022

Closing, pint handles dependencies with extras.
Docs specifies Measuremnt needs uncertainties package installed.

Same goes for numpy

@jules-ch jules-ch closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants