简体   繁体   English

如何在 Rocker/tidyverse:latest 上为 R 安装 azuremlsdk?

[英]How to install azuremlsdk for R on rocker/tidyverse:latest?

I try to install azuremlsdk for R on rocker/tidyverse:latest image:我尝试在azuremlsdk rocker/tidyverse:latest image 上为 R 安装azuremlsdk

dir.create("library")

install.packages("azuremlsdk", repos="https://cloud.r-project.org", lib="library")
azuremlsdk::install_azureml()

However, I get the following error on the last line:但是,我在最后一行收到以下错误:

Error in loadNamespace(name) : there is no package called 'azuremlsdk' Calls: :: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart loadNamespace(name) 中的错误:没有名为“azuremlsdk”的包调用::: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart

Why does it happen and how to fix it?为什么会发生以及如何解决?

PS I must install everything inside library because otherwise the folder is not writable. PS 我必须在library安装所有内容,否则该文件夹不可写。

If you can suggest a docker image that includes R and AzureML SDK for R, then I'd appreciate as well.如果您能推荐一个包含 R 和 AzureML SDK for R 的 docker 镜像,我也会很感激。

Step-by-step instructions for installing the Azure ML SDK for R:安装适用于 R 的 Azure ML SDK 的分步说明:

Step1: Install Conda第一步:安装康达

If you do not have Conda already installed on your machine, you will first need to install it, since the Azure ML R SDK uses reticulate to bind to the Python SDK.如果您的计算机上尚未安装 Conda,则首先需要安装它,因为 Azure ML R SDK 使用网状绑定到 Python SDK。 We recommend installing Miniconda, which is a smaller, lightweight version of Anaconda.我们建议安装 Miniconda,它是 Anaconda 的一个更小、更轻的版本。 Choose the 64-bit binary for Python 3.5 or later.为 Python 3.5 或更高版本选择 64 位二进制文​​件。

Step2: Install the azuremlsdk R package Step2:安装azuremlsdk R包

You will need remotes to install azuremlsdk from the GitHub repo.您将需要遥控器才能从 GitHub 存储库安装 azuremlsdk。

install.packages('remotes')

Then, you can use the install_github function to install the package.然后,您可以使用 install_github 函数来安装包。

remotes::install_cran('azuremlsdk', repos = 'https://cloud.r-project.org/')

If you are using R installed from CRAN, which comes with 32-bit and 64-bit binaries, you may need to specify the parameter INSTALL_opts=c("--no-multiarch") to only build for the current 64-bit architecture.如果您使用的是从 CRAN 安装的 R,它带有 32 位和 64 位二进制文​​件,您可能需要指定参数 INSTALL_opts=c("--no-multiarch") 以仅构建当前 64 位架构.

remotes::install_cran('azuremlsdk', repos = 'https://cloud.r-project.org/', INSTALL_opts=c("--no-multiarch"))

For more details, refer " Install the Azure ML SDK for R " and " Azure ML SDK for R ".有关更多详细信息,请参阅“ 安装适用于 R 的 Azure ML SDK ”和“适用于 R 的 Azure ML SDK ”。

Hope this helps.希望这可以帮助。 Do let us know if you any further queries.如果您有任何进一步的疑问,请告诉我们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM