Skip to content

ModuleNotFoundError when importing cupy_xarray #56

Description

@miguelcarcamov

I'm tryinh to import cupy_xarray as showed in the example in the README.md. I have installed cupy_xarray with pip install cupy-xarray. However I get this error when importing the package.

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[10], line 1
----> 1 import cupy_xarray

File ~/.conda/envs/pyralysis-env/lib/python3.12/site-packages/cupy_xarray/__init__.py:2
      1 from . import _version
----> 2 from .accessors import CupyDataArrayAccessor, CupyDatasetAccessor  # noqa
      4 __version__ = _version.get_versions()[\"version\"]

File ~/.conda/envs/pyralysis-env/lib/python3.12/site-packages/cupy_xarray/accessors.py:8
      1 import cupy as cp
      2 from xarray import (
      3     DataArray,
      4     Dataset,
      5     register_dataarray_accessor,
      6     register_dataset_accessor,
      7 )
----> 8 from xarray.core.pycompat import DuckArrayModule
     10 dsk = DuckArrayModule(\"dask\")
     11 dask_array_type = dsk.type

ModuleNotFoundError: No module named 'xarray.core.pycompat'"

Versions:

cupy-xarray==0.1.3
xarray==2024.6.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions