请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 28312|回复: 23

[求助] python中CDO调用失败

[复制链接]

新浪微博达人勋

发表于 2019-3-11 10:08:38 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
试图在python中使用CDO, 已经装好scipy及netcdf4,在运行时出现问题如图:
$]VV$I_RQNMKL_$WB}_3$6I.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-3-11 12:22:28 | 显示全部楼层
反斜杠吧。。。。。。
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2019-3-11 12:45:47 | 显示全部楼层
反斜杠,cdo好像没有win版本
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-3-11 18:10:36 | 显示全部楼层
Lancelot 发表于 2019-3-11 12:45
反斜杠,cdo好像没有win版本

代码很简单

from cdo import *
cdo = Cdo()

在ubuntu下也用不起cdo
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-3-11 19:03:12 | 显示全部楼层
你有没有把cdo添加到环境变量?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-3-11 20:12:32 | 显示全部楼层
自行车大大爷 发表于 2019-3-11 18:10
代码很简单

from cdo import *

第二句已经在调用内容了,和简不简单没关系
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-3-11 22:42:22 | 显示全部楼层
本帖最后由 自行车大大爷 于 2019-3-11 23:19 编辑
Lancelot 发表于 2019-3-11 20:12
第二句已经在调用内容了,和简不简单没关系

我用conda install cdo 输入命令回车后显示
cdo: error while loading shared libraries: libhdf5.so.103: cannot open shared object file: No such file or directory
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-3-11 22:48:21 | 显示全部楼层
本帖最后由 自行车大大爷 于 2019-3-11 23:18 编辑
eeeee 发表于 2019-3-11 19:03
你有没有把cdo添加到环境变量?

-By default the cdo-bindings use the 'cdo' binary found in your $PATH variable. To change that, you can
  • load a module before calling your script(module command or another package manager like conda or spack)
  • use the CDO environment variable to set the path to be used
  • use the python/ruby method cdo.setCdo('/path/to/the/CDO/executable/you/want'). By this technique you can create different objects for different CDO versions
  • 您是说这个吗?我使用 conda install cdo ,输入命令回车后显示 cdo: error while loading shared libraries: libhdf5.so.103: cannot open shared object file: No such file or directory
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-3-11 23:28:13 | 显示全部楼层
自行车大大爷 发表于 2019-3-11 22:42
我用conda install cdo 输入命令回车后显示
cdo: error while loading shared libraries: libhdf5.so.10 ...

cdo程序没装好
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-3-12 08:11:02 | 显示全部楼层

大佬知道这个问题怎么解决吗
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表