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

Python 3.8 ioos_qc leads to an ImportError with xarray, but Python 3.7 does not. #77

Closed
kthyng opened this issue Jul 28, 2022 · 2 comments · Fixed by #78
Closed

Python 3.8 ioos_qc leads to an ImportError with xarray, but Python 3.7 does not. #77

kthyng opened this issue Jul 28, 2022 · 2 comments · Fixed by #78

Comments

@kthyng
Copy link

kthyng commented Jul 28, 2022

mamba create --name test-xarray-ioosqc38 python=3.8 xarray ioos_qc
conda activate test-xarray-ioosqc38

and then in a python window trying:

from ioos_qc.streams import NumpyStream

gives

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kthyng/miniconda3/envs/test-xarray-ioosqc/lib/python3.8/site-packages/ioos_qc/streams.py", line 10, in <module>
    from xarray.core.indexing import remap_label_indexers
ImportError: cannot import name 'remap_label_indexers' from 'xarray.core.indexing' (/Users/kthyng/miniconda3/envs/test-xarray-ioosqc/lib/python3.8/site-packages/xarray/core/indexing.py)

However, the following environment with Python 3.7 does not lead to an error:

mamba create --name test-xarray-ioosqc37 python=3.7 xarray ioos_qc
@ocefpaf
Copy link
Member

ocefpaf commented Jul 28, 2022

This is most likely a packaging problem. Can you do a conda list on both environments and post for us here?

Scratch that. remap_label_indexers was removed in pydata/xarray#5692 and we need to pin to xarray<2022.3.0 until ioos_qc code is adapted to the new xarray.

@kthyng
Copy link
Author

kthyng commented Jul 28, 2022

Thanks for figuring that out!

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

Successfully merging a pull request may close this issue.

2 participants