| 
 
	积分648贡献 精华在线时间 小时注册时间2016-4-25最后登录1970-1-1 
 | 
 
 
 楼主|
发表于 2020-5-20 10:51:15
|
显示全部楼层 
| 把这几个库安装了下,运行报错了,
 显示:ModuleNotFoundError: No module named 'pyeccodes'
 然后pyeccodes好像只有tar版本,貌似Windows安装不了。
 
 
 >>> data = xr.open_dataset(file,engine = 'cfgrib')
 Traceback (most recent call last):
 File "C:\Python36\lib\site-packages\cfgrib\bindings.py", line 48, in <module>
 lib = ffi.dlopen(libname)
 File "C:\Python36\lib\site-packages\cffi\api.py", line 150, in dlopen
 lib, function_cache = _make_ffi_library(self, name, flags)
 File "C:\Python36\lib\site-packages\cffi\api.py", line 832, in _make_ffi_library
 backendlib = _load_backend_lib(backend, libname, flags)
 File "C:\Python36\lib\site-packages\cffi\api.py", line 827, in _load_backend_lib
 raise OSError(msg)
 OSError: ctypes.util.find_library() did not manage to locate a library called 'libeccodes'
 
 The above exception was the direct cause of the following exception:
 
 Traceback (most recent call last):
 File "C:\Python36\lib\site-packages\cfgrib\messages.py", line 37, in <module>
 from . import bindings as eccodes
 File "C:\Python36\lib\site-packages\cfgrib\bindings.py", line 86, in <module>
 CODES_TYPE_UNDEFINED = lib.GRIB_TYPE_UNDEFINED
 File "C:\Python36\lib\site-packages\cfgrib\bindings.py", line 43, in __getattr__
 raise RuntimeError(self.message) from self.exc
 RuntimeError: ecCodes library not found on the system.
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
 File "<pyshell#4>", line 1, in <module>
 data = xr.open_dataset(file,engine = 'cfgrib')
 File "C:\Python36\lib\site-packages\xarray\backends\api.py", line 520, in open_dataset
 filename_or_obj, lock=lock, **backend_kwargs
 File "C:\Python36\lib\site-packages\xarray\backends\cfgrib_.py", line 38, in __init__
 import cfgrib
 File "C:\Python36\lib\site-packages\cfgrib\__init__.py", line 19, in <module>
 from .cfmessage import CfMessage
 File "C:\Python36\lib\site-packages\cfgrib\cfmessage.py", line 29, in <module>
 from . import messages
 File "C:\Python36\lib\site-packages\cfgrib\messages.py", line 39, in <module>
 import pyeccodes.compat as eccodes
 ModuleNotFoundError: No module named 'pyeccodes'
 | 
 |