【问题标题】:R: unable to install AzureML package (R version 3.3.3)R:无法安装 AzureML 包(R 版本 3.3.3)
【发布时间】:2020-01-20 16:57:40
【问题描述】:

我正在尝试为 R 安装 AzureML 包(版本 3.3.3),以便能够在 Microsoft PowerBI 中运行一些 R 脚本。

当我在控制台中运行 install.packages("AzureML") 时,出现以下错误:

> install.packages("AzureML")
Installing package into ‘C:/Users/MyName/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: unable to access index for repository https://mirrors.ustc.edu.cn/CRAN/src/contrib:
  cannot open URL 'https://mirrors.ustc.edu.cn/CRAN/src/contrib/PACKAGES'
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Error in readRDS(file) : 
  cannot read workspace version 3 written by R 3.6.2; need R 3.5.0 or newer
In addition: Warning message:
package ‘AzureML’ is not available (for R version 3.3.3) 
Warning: unable to access index for repository https://mirrors.ustc.edu.cn/CRAN/bin/windows/contrib/3.3:
  cannot open URL 'https://mirrors.ustc.edu.cn/CRAN/bin/windows/contrib/3.3/PACKAGES'
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.3:
  cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.3/PACKAGES'

我在某处读到 PowerBI 不支持 R 版本 >3.3.3,这就是我将自己限制在这个版本的原因。

此外,我对其他版本也尝试过同样的操作,但我总是收到以下信息: package ‘AzureML’ is not available (for R version 3.x.y)

我做错了什么?

【问题讨论】:

    标签: r azure powerbi


    【解决方案1】:

    答案是:AzureML 包没有发布到 CRAN,所以找不到。

    解决方法是:

    1. 打开 PowerBI 并转到文件 > 选项和设置 > 选项 > R 脚本 > 检测到的 R 目录。这会告诉你哪个版本 您正在使用的 R;
    2. 启动特定的 R 版本并输入 install.packages("devtools", type = "win.binary")
    3. 然后,根据this source,输入devtools::install_github("RevolutionAnalytics/AzureML")
    4. 然后,前往C:\Users\YourUser\Documents\R\win-library\3.4,如果您遇到无法写入library 文件夹的错误,则可能已保存所有包。复制win-library\3.4中的所有包,粘贴到C:\Program Files\R\R-3.4.4\library,这是R库文件夹的默认位置;
    5. 通过在 R 控制台中键入 library("AzureML") 来测试 AzureML 是否已正确加载;
    6. 返回 PowerBI 并重新运行使用 AzureML 的 R 脚本。这次应该可以了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-22
      • 1970-01-01
      • 1970-01-01
      • 2021-11-20
      • 2015-10-02
      • 2015-03-10
      • 1970-01-01
      相关资源
      最近更新 更多