个人在安装python包的时候,遇到了一些奇怪的问题,特此记录,方便避坑
由于conda install rasterio 版本较低,因此会和高版本的gdal冲突
conda install -c conda-forge gdal
conda install -c conda-forge rasterio=1.3.7
conda install -c conda-forge rioxarray
conda install -c conda-forge xarray
如果之前安装了rioxarray,那么conda会自动安装xarray
xarray 安装后并不完整,会出现 IO 错误,按照提示装完缺失的组件即可
ValueError: found the following matches with the input file in xarray’s IO backends: [‘netcdf4’, ‘h5netcdf’]. But their dependencies may not be installed, see:
https://docs.xarray.dev/en/stable/user-guide/io.html
https://docs.xarray.dev/en/stable/getting-started-guide/installing.html
conda install -c conda-forge netcdf4
conda install -c conda-forge h5netcdf