gpt4 book ai didi

scipy - 值错误 : unrecognized engine zarr must be one of: ['scipy' , 'store' ]

转载 作者:行者123 更新时间:2023-12-05 03:41:25 26 4
gpt4 key购买 nike

我正在尝试打开 zarr 文件,

import pandas as pd
import xarray as xr
xf = xr.open_zarr("../../data/processed/geolink_norge_dataset/geolink_norge_well_logs.zarr")

但是出现错误:


ValueError                                Traceback (most recent call last) <ipython-input-17-ff38d9c54463> in <module>
1 import pandas as pd
2 import xarray as xr
----> 3 xf = xr.open_zarr("../../data/processed/geolink_norge_dataset/geolink_norge_well_logs.zarr")
4
5 # We will use just the 30* wells

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\zarr.py in open_zarr(store, group, synchronizer, chunks, decode_cf, mask_and_scale, decode_times, concat_characters, decode_coords, drop_variables, consolidated, overwrite_encoded_chunks, chunk_store, storage_options, decode_timedelta, use_cftime, **kwargs)
685 }
686
--> 687 ds = open_dataset(
688 filename_or_obj=store,
689 group=group,

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\api.py in open_dataset(filename_or_obj, engine, chunks, cache, decode_cf, mask_and_scale, decode_times, decode_timedelta, use_cftime, concat_characters, decode_coords, drop_variables, backend_kwargs,
*args, **kwargs)
480 engine = plugins.guess_engine(filename_or_obj)
481
--> 482 backend = plugins.get_backend(engine)
483
484 decoders = _resolve_decoders_kwargs(

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\plugins.py in get_backend(engine)
132 engines = list_engines()
133 if engine not in engines:
--> 134 raise ValueError(
135 f"unrecognized engine {engine} must be one of: {list(engines)}"
136 )

ValueError: unrecognized engine zarr must be one of: ['scipy','store']

谁能帮忙解决这个问题?我可以确认我已经安装了 scipy 和 store 包。

最佳答案

您可能还需要安装 zarr 包:

pip install zarr

如果还是不行,试试:

pip install xarray[complete]

参见 https://github.com/pydata/xarray/issues/5395#issuecomment-850483726获取更多信息。

关于scipy - 值错误 : unrecognized engine zarr must be one of: ['scipy' , 'store' ],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67797870/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com