gpt4 book ai didi

python - 使用 eccodes/grib 时如何解决这个 AttributeError?

转载 作者:行者123 更新时间:2023-12-04 17:26:21 31 4
gpt4 key购买 nike

我在 macOS 上使用 cfgrib,当我尝试将 grib 文件隐藏到 xarray 中时出现以下错误:

AttributeError: module 'pyeccodes.compat' has no attribute 'codes_grib_multi_support_off'

这是我目前的代码:

import xarray as xr

import matplotlib.pyplot as plt
import matplotlib.style as sty
sty.use('classic')

import numpy as np

import cartopy.crs as ccrs
d7 = xr.open_dataset('2007_BLH.grib', engine='cfgrib')

我已经下载了所有似乎需要的东西,包括 eccodes、pyeccodes、cfgrib。我该如何解决这个问题?

最佳答案

使用包管理器安装 ecCodes 二进制文件,请参阅:https://github.com/ecmwf/cfgrib#binary-dependencies .

关于python - 使用 eccodes/grib 时如何解决这个 AttributeError?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63044813/

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