3

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. The package was on CRAN (wasn't it?) Now I try to follow the instructions from the packgage page:

  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’

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

Is there a way to install mxnet for R from the R command line (so I can try it in the cloud as well)? or I have to switch to keras entirely ....:)

Any help is appreciated.

my sessioninfo is:

R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 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

attached base packages: [1] stats graphics grDevices utils
datasets methods base

other attached packages: [1] xgboost_0.6.4.1

loaded via a namespace (and not attached): [1] drat_0.1.4
compiler_3.5.0 magrittr_1.5 Matrix_1.2-14
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
devtools_1.13.5 lattice_0.20-35

Richi W
  • 3,534
  • 4
  • 20
  • 39
  • 1
    I don't see any mxnet in either the current CRAN package checks or in the package Archive. You haven't shown what efforts you have made to carry out the instructions for installing from a local copy. – IRTFM Apr 25 '18 at 19:55
  • I contunued my search and found the answer here: https://discuss.mxnet.io/t/install-precompiled-mxnet-r-cpu-windows/623 – Richi W Apr 25 '18 at 20:07
  • The line install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL) installs it – Richi W Apr 25 '18 at 20:08

1 Answers1

6

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:

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

I found it in the Q & A forum.

Richi W
  • 3,534
  • 4
  • 20
  • 39
  • 1
    I tried your code and it doesnt seem to work, could you please take a look? > install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL) Installing package into ‘C:/Users/me/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip' Content type 'application/zip' length 29498166 bytes (28.1 MB) downloaded 28.1 MB > library(mxnet) Error: package or namespace load failed for ‘mxnet’: package ‘mxnet’ was installed before R 4.0.0: please re-install it – stats_noob Dec 30 '20 at 02:50
  • https://stackoverflow.com/questions/65495946/r-namespace-load-failed-for-mxnet-package-mxnet-was-installed-before-r-4-0?noredirect=1#comment115795441_65495946 – stats_noob Dec 30 '20 at 02:50