导入mgcv失败,因为找不到Rlapack.dll [英] Importing mgcv fails because Rlapack.dll cannot be found

查看:120
本文介绍了导入mgcv失败,因为找不到Rlapack.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 R.NET 库链接到IronPython中的R统计软件包.一切正常,但现在我需要使用R的 mgcv 库.

I want to link to the R statistical package in IronPython by using the R.NET library. It's been working fine, but now I need to use R's mgcv library.

导入mgcv失败(使用命令rdn.r.EagerEvaluate("library(mgcv)")完成导入,其中rdn是包装R.NET库的IronPython对象).导入失败时,Windows将打开一个对话框,其中显示:由于计算机中缺少Rlapack.dll,因此无法启动该程序.请尝试重新安装该程序以解决此问题."

Importing mgcv fails (import is done with the command rdn.r.EagerEvaluate("library(mgcv)"), where rdn is an IronPython object that wraps the R.NET library). When the import fails, Windows opens a dialog box that says: "The program can't start because Rlapack.dll is missing from your computer. Try reinstalling the program to fix this problem."

当然,如果缺少Rlapack.dll,R最初将永远无法工作,那么这是怎么回事?

Of course, R never would have worked in the first place if Rlapack.dll was missing, so what is going on?

推荐答案

我检查了mgcv包的依赖关系;它们包括基本软件包Matrix.事实证明,R开发团队已将Matrix编译为dll(位于$ {R_HOME}/library/Matrix/libs/i386/Matrix.dll中).该dll需要链接到Rlapack.dll,由于某些原因,当在IronPython中从R.NET调用R时,找不到它.

I inspected the dependencies of the mgcv package; they include the base package Matrix. As it turns out, Matrix has been compiled to a dll (found at ${R_HOME}/library/Matrix/libs/i386/Matrix.dll) by the R development team. That dll needs to link to Rlapack.dll, which for some reason it cannot find when R is called from R.NET in IronPython.

解决方案是将Rlapack.dll的副本(您可以在$ {R_HOME}/bin/i386/中找到)复制到与Matrix.dll相同的目录中.现在每天是星期天.

The solution was to drop a copy of Rlapack.dll (which you can find in ${R_HOME}/bin/i386/) into the same directory as Matrix.dll. Now every day is Sunday.

这篇关于导入mgcv失败,因为找不到Rlapack.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆