简体   繁体   English

如何为mxnet安装R软件包?

[英]How to install the R package for mxnet?

I used to work with the mxnet package in R. I have an old installation and I can use it in R 3.4x but now I want to switch to the newest R version (R 3.5 locally) and I would love to use it on rstudio.cloud. 我曾经在R中使用mxnet软件包。我安装了旧版本,可以在R 3.4x中使用它,但是现在我想切换到最新的R版本(本地为R 3.5),我很想在rstudio上使用它。云。 The package was on CRAN (wasn't it?) Now I try to follow the instructions from the packgage page : 包裹在CRAN上了(不是吗?)现在,我尝试按照包裹页面上的说明进行操作:

  cran <- getOption("repos")
  cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"
  options(repos = cran)
  install.packages("mxnet")

and I get the following result: 我得到以下结果:

installing the source package 'mxnet' 安装源包“ mxnet”

trying URL ' https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_0.10.1.tar.gz ' Warning in install.packages : cannot open URL ' https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_0.10.1.tar.gz ': HTTP status was '404 Not Found' Error in download.file(url, destfile, method, mode = "wb", ...) : cannot open URL ' https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_0.10.1.tar.gz ' Warning in install.packages : download of package 'mxnet' failed 试图URL ' https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_0.10.1.tar.gz '警告在install.packages:无法打开URL“ 的https:/ /apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_0.10.1.tar.gz':download.file(URL,destfile ,方法,模式=“ wb”,...):无法打开URL'https: //apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_0.10.1.tar.gz 'install.packages中的警告:软件包“ mxnet”的下载失败

Is there a way to install mxnet for R from the R command line (so I can try it in the cloud as well)? 有没有办法从R命令行为R安装mxnet(所以我也可以在云中尝试)? or I have to switch to keras entirely ....:) 或者我必须完全转向keras .... :)

Any help is appreciated. 任何帮助表示赞赏。

my sessioninfo is: 我的sessioninfo是:

R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) R版本3.5.0(2018-04-23)平台:x86_64-w64-mingw32 / x64(64位)运行于:Windows> = 8 x64(内部版本9200)

Matrix products: default 矩阵产品:默认

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 区域设置:[1] LC_COLLATE =英语_美国.1252 LC_CTYPE =英语_美国.1252 [3] LC_MONETARY =英语_美国.1252 LC_NUMERIC = C [5] LC_TIME =英语_美国.1252

attached base packages: [1] stats graphics grDevices utils 附加的基本软件包:[1]统计图形grDevices utils
datasets methods base 数据集方法库

other attached packages: [1] xgboost_0.6.4.1 其他附带的软件包:[1] xgboost_0.6.4.1

loaded via a namespace (and not attached): [1] drat_0.1.4 通过名称空间(未附加)加载:[1] drat_0.1.4
compiler_3.5.0 magrittr_1.5 Matrix_1.2-14 编译器_3.5.0 magrittr_1.5矩阵_1.2-14
tools_3.5.0 [6] withr_2.1.2 yaml_2.1.18 tools_3.5.0 [6] withr_2.1.2 yaml_2.1.18
memoise_1.1.0 stringi_1.1.7 grid_3.5.0 [11] data.table_1.10.4-3 digest_0.6.15 pacman_0.4.6 memoise_1.1.0 stringi_1.1.7 grid_3.5.0 [11] data.table_1.10.4-3摘要_0.6.15 pacman_0.4.6
devtools_1.13.5 lattice_0.20-35 devtools_1.13.5点阵_0.20-35

I answer my own question as it was really hard for me to find the answer and others could benefit. 我回答自己的问题是因为我很难找到答案,其他人也可以从中受益。

The following line installs the CPU version: 以下行将安装CPU版本:

install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)

I found it in the Q & A forum . 我在“问答” 论坛中找到了它。

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

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