针对不同系统安装cinrad库的问题

在windows系统下安装cinrad库,首先需要在激活的环境下运行以下代码:

conda install -c conda-forge cartopy

然后才可以进行安装,否则会报错:

pip install cinrad -i https://pypi.tuna.tsinghua.edu.cn/simple

mac不同于windows系统,在安装cinrad数据库的时候不会出现报错现象,具体安装方法如下:

首先激活anaconda下你需要使用的环境(因个人情况而异),输入:

conda install -c conda-forge cartopy

上面这一步基本上没啥问题,然后是安装cinrad库:

pip install cinrad -i https://pypi.tuna.tsinghua.edu.cn/simple

部分mac用户可能会遇到以下报错:

ERROR: Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

主要原因在于pip版本过高,需要降低pip版本至9.0.1:

pip install pip==9.0.1

再次运行cinrad库的安装代码即可。

安装完成后可以选择将pip版本安装成最新版:

pip install --upgrade pip

运行cinrad示例代码生成0.5°仰角反射率图片:

from cinrad.visualize import PPI
from cinrad.io import StandardData

f = StandarData(file_path)
ref = f.get_data(0,230,'REF')
fig = PPI(ref)
fig('ref.png')

可能会报以下多种问题:

第一种:

ImportError: DLL load failed while importing _imaging: 找不到指定的模块。

解决方法,降低pillow版本:

pip install pillow==8.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

第二种:

ImportError: DLL load failed while importing _network: 找不到指定的模块。

 解决方法,降低pyproj版本:

pip install pyproj==3.1.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

第三种:

AttributeError: 'GeoAxes' object has no attribute 'background_patch'

解决方法,更改源码 :

ax.patch.set_visible(False)

第四种:

AttributeError:'GeoAxes' object has no attribute 'outline_patch'

解决方法,更改源码:

ax.spines['geo'].set_visible(False)

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值