Skip to content

pint-convert fails with uncertainties related error if numpy is not installed as well - document numpy dependence or give a better error message #2016

@doronbehar

Description

@doronbehar

I'm experiencing the following error when trying out the pint-convert executable:

$ pint-convert '32 m/s' 'mile/hour'
Traceback (most recent call last):
  File "/nix/store/c46r9a4x6c67dwr7mb0l6d00apb723l2-python3.11-pint-0.24/bin/.pint-convert-wrapped", line 6, in <module>
    from pint.pint_convert import main
  File "/nix/store/c46r9a4x6c67dwr7mb0l6d00apb723l2-python3.11-pint-0.24/lib/python3.11/site-packages/pint/pint_convert.py", line 106, in <module>
    (R_i, g_e, m_u, m_e, m_p, m_n) = uncertainties.correlated_values_norm(
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'uncertainties' has no attribute 'correlated_values_norm'

My uncertainties version is 3.2.1 - upstream's latest. I also experienced this error with uncertainties 3.1.7. The uncertainties version should ideally be specified in pyproject.toml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions