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

Installation of compliance-checker does not work with pip #1103

Closed
renaudjester opened this issue Aug 6, 2024 · 10 comments
Closed

Installation of compliance-checker does not work with pip #1103

renaudjester opened this issue Aug 6, 2024 · 10 comments

Comments

@renaudjester
Copy link

Version of compliance checker running:
5.1.1

To Reproduce:

>pip install compliance-checker 
...
>python
>>> from compliance_checker.runner import ComplianceChecker 

Describe the issue below:

I wanted to try this package out. So I did:
pip install compliance-checker
It was successful but then when I did:
from compliance_checker.runner import ComplianceChecker
It failed.
I am on mac OS with apple chip M2 and python 3.11.6.

Here is the traceback of the error:

>>> from compliance_checker.runner import ComplianceChecker
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/compliance_checker/runner.py", line 8, in <module>
    from compliance_checker.suite import CheckSuite
  File "/Users/rjester/.asdf/installs/python/3.11.6/lib/python3.11/site-packages/compliance_checker/suite.py", line 29, in <module>
    from compliance_checker.base import BaseCheck, GenericFile, Result, fix_return_value
  File "/Users/rjester/.asdf/installs/python/3.11.6/lib/python3.11/site-packages/compliance_checker/base.py", line 22, in <module>
    import compliance_checker.cfutil as cfutil
  File "/Users/rjester/.asdf/installs/python/3.11.6/lib/python3.11/site-packages/compliance_checker/cfutil.py", line 11, in <module>
    from cf_units import Unit
  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'

I tried to do pip install cfunits but I still get the same error.

@ocefpaf
Copy link
Member

ocefpaf commented Aug 6, 2024

The problem is not compliance-checker but cf_units. Please open an issue at: https://github.com/SciTools/cf-units

PS: I'm working on ditching the cf-units dependency in the future due to its slow release cycle and dependency on udunits2, which is hard to distribute.

@renaudjester
Copy link
Author

renaudjester commented Aug 6, 2024

Ok ok! Thanks for the fast answer, I will do! Do you have a good workaround in the meantime?

@ocefpaf
Copy link
Member

ocefpaf commented Aug 6, 2024

Ok ok! Thanks for the fast answer, I will do! Do you have a workaround in the meantime?

I'm not a mac expert but you can:

  1. Try the package in conda-forge b/c I'm 99% sure we do have all the binaries for osx-arm64 there.
  2. Try Rosetta: https://support.apple.com/en-us/102527.

@renaudjester
Copy link
Author

renaudjester commented Aug 6, 2024

I am a bit reluctant to work with conda or Rosetta for the long term 🤔 but well it can be a temporary solution to try compliance-checker out! Thanks!

@renaudjester
Copy link
Author

Issue created here: SciTools/cf-units#438

@ocefpaf
Copy link
Member

ocefpaf commented Aug 6, 2024

I can't speak for Rosetta b/c I never had a mac and that is a mac only. With regards to conda, I can assure you that all the Software stack maintained by IOOS will be available and well curate in the community conda-forge channel. In fact, IOOS supports that channel and we have some instructions to help people get started in https://ioos.github.io/ioos_code_lab/content/ioos_installation_conda.html

@uriii3
Copy link

uriii3 commented Aug 6, 2024

In my case Rosetta doesn't work either... (because of cfunits!). Anyway, thanks a lot!

@ocefpaf
Copy link
Member

ocefpaf commented Aug 6, 2024

In my case Rosetta doesn't work either... (because of cfunits!). Anyway, thanks a lot!

It should, unless you are using Python 3.12.

@uriii3
Copy link

uriii3 commented Aug 6, 2024

Ah ups haha, indeed I was using python 3.12. Thanks!

@benjwadams
Copy link
Contributor

Closing unless there are further indications of issues with Compliance Checker, rather than dependent packages.

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

4 participants