SciTools / cf-units

Units of measure as required by the Climate and Forecast (CF) Metadata Conventions
https://cf-units.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
64 stars 46 forks source link

cf_units not working on macOS arm64 #438

Open renaudjester opened 1 month ago

renaudjester commented 1 month ago

🐛 Bug Report

I did: pip install cfunits It was successful but then when I tried to import the package it failed. I am on mac OS with apple chip M2 and python 3.11.6.

Here is the traceback of the error:

>>> import cf_units
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rjester/.asdf/installs/python/3.11.6/lib/python3.11/site-packages/cf_units/__init__.py", line 23, in <module>
    from cf_units import _udunits2 as _ud
ImportError: dlopen(/Users/rjester/.asdf/installs/python/3.11.6/lib/python3.11/site-packages/cf_units/_udunits2.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_ut_ignore'

How to Reproduce

Steps to reproduce the behaviour:

  1. pip install cfunits
  2. python
  3. >>> import cf_units

Expected Behaviour

I expect that cfunits can be imported without an error.

Environment

ocefpaf commented 1 month ago

Looks like support for it was added in https://github.com/SciTools/cf-units/pull/411 but there wasn't a new release or post release since then. @bjlittle Do you believe you can cut a post release to get py312 and osx-arm64 wheels on PyPI? It would be awesome if https://github.com/SciTools/cf-units/pull/423 and https://github.com/SciTools/cf-units/pull/427 could be merged too.

trexfeathers commented 1 month ago

Apologies, we're still struggling to make time for cf-units, but we have now allocated 2 weeks exclusively for this in September, so watch this space.