我正在尝试使用 xarray 打开 RINEX 数据集。虽然我已经安装了
netCDF4
和 scipy
,但我收到以下值错误。
ValueError: did not find a match in any of xarray's currently installed IO backends ['netcdf4', 'scipy']. Consider explicitly selecting one of the installed engines via the ``engine`` parameter, or installing additional IO dependencies, see:
http://xarray.pydata.org/en/stable/getting-started-guide/installing.html
http://xarray.pydata.org/en/stable/user-guide/io.html
当我再次尝试安装 scipy 和 netcdf4 时,我收到以下消息。
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: netcdf4 in c:\users\sdasgupta.student\appdata\roaming\python\python39\site-packages (1.6.1)
Requirement already satisfied: numpy>=1.9 in c:\programdata\anaconda3\lib\site-packages (from netcdf4) (1.21.5)
Requirement already satisfied: cftime in c:\users\sdasgupta.student\appdata\roaming\python\python39\site-packages (from netcdf4) (1.6.2)
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: scipy in c:\users\sdasgupta.student\appdata\roaming\python\python39\site-packages (1.9.3)
Requirement already satisfied: numpy<1.26.0,>=1.18.5 in c:\programdata\anaconda3\lib\site-packages (from scipy) (1.21.5)
我已经卸载并安装了 xarray、scipy 和 netcdf4,但它仍然给我同样的错误。
检查文件是否存在。
根据
xarray
github上的这个答案:https://github.com/pydata/xarray/issues/6335#issuecomment-1199282081
由于人们在关闭后提出了问题(我也遇到了类似的问题),因此如果指定的文件不存在,则可能会以误导性的方式引发此 ValueError 异常。该异常意味着它是文件格式错误,但它可能只是不存在。