When I am importing pypsa module in spyder IDE, I got this follwing error, and please help me how to sort out this issue?

import pypsa Traceback (most recent call last):

Cell In[1], line 1 import pypsa

File ~\miniconda3\Lib\site-packages\pypsa_init_.py:8 from pypsa import (

File ~\miniconda3\Lib\site-packages\pypsa\components.py:37 from pypsa.io import (

File ~\miniconda3\Lib\site-packages\pypsa\io.py:30 import xarray as xr

File ~\miniconda3\Lib\site-packages\xarray_init_.py:1 from xarray import testing, tutorial

File ~\miniconda3\Lib\site-packages\xarray\testing.py:10 from xarray.core import duck_array_ops, formatting, utils

File ~\miniconda3\Lib\site-packages\xarray\core\duck_array_ops.py:36 from xarray.core import dask_array_ops, dtypes, nputils

File ~\miniconda3\Lib\site-packages\xarray\core\dask_array_ops.py:3 from xarray.core import dtypes, nputils

File ~\miniconda3\Lib\site-packages\xarray\core\dtypes.py:7 from xarray.core import utils

File ~\miniconda3\Lib\site-packages\xarray\core\utils.py:443 class Frozen(Mapping[K, V]):

TypeError: 'ABCMeta' object is not subscriptable

1

There are 1 answers

1
Fabian Hofmann On

This seems to be related to xarray not to pypsa. You could try to uninstall/install or update xarray.