Can't import xarray package

Hi, I installed xarray package (vn 2022.6.0), but when I run 'import xarray' I get this error code (shown below). My issue is that the xarray package file is read only, so I'm not sure how to fix it. Can someone please help me? Thanks, Ayesha :)

Traceback (most recent call last):
  File "/Users/ash221/PycharmProjects/u-ah284/", line 3, in <module>
    import xarray as xr
  File "/Users/ash221/PycharmProjects/u-ah284/venv/lib/python3.10/site-packages/xarray/", line 1, in <module>
    from . import testing, tutorial
  File "/Users/ash221/PycharmProjects/u-ah284/venv/lib/python3.10/site-packages/xarray/", line 13, in <module>
    from .backends.api import open_dataset as _open_dataset
  File "/Users/ash221/PycharmProjects/u-ah284/venv/lib/python3.10/site-packages/xarray/backends/", line 14, in <module>
    from .pydap_ import PydapDataStore
  File "/Users/ash221/PycharmProjects/u-ah284/venv/lib/python3.10/site-packages/xarray/backends/", line 20, in <module>
    import pydap.client
  File "/Users/ash221/PycharmProjects/u-ah284/venv/lib/python3.10/site-packages/pydap/", line 50, in <module>
    from .model import DapType
  File "/Users/ash221/PycharmProjects/u-ah284/venv/lib/python3.10/site-packages/pydap/", line 175, in <module>
    from collections import OrderedDict, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/

Process finished with exit code 1


Please sign in to leave a comment.