Install precompiled mxnet R CPU windows

I am trying to install the precompiled mxnet 1.0.0 R CPU version on Windows. According to the website, I should run the following code, but failed:

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

The error message:
Installing package into ‘C:/Users/QTIAN2/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘mxnet’
These will not be installed

Can anyone share some insight into this? Many thanks!

Cin

Hi,

I just built a pre-compiled Windows binary for mxnet R 1.2.0 CPU, details available here: https://github.com/jeremiedb/mxnet_winbin

In short, you should be able to install it with:
install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)

The website’s official download link has unfortunatly not been updated for a while.

1 Like

Hello,

I tried following steps on a Windows machine which had R-3.4.4 installed. And I am able to exercise MxNet successfully.
You may want to try following steps -

cran ← getOption(“repos”)
cran[“dmlc”] ← “https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/
options(repos = cran)

install.packages(“devtools”)
require(devtools)
install_version(“DiagrammeR”, version = “0.9.0”, repos = “http://cran.us.r-project.org”)
require(DiagrammeR)

install.packages(“mxnet”)

library(mxnet)
a ← mx.nd.ones(c(2,3), ctx = mx.cpu())
b ← a * 2 + 1
b

I am also trying to install MXNET package for R and it does not work. When I try the instructions above I get the following message:

age into ‘C:/Users/Owner/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘data.table’

Warning: unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/bin/windows/contrib/3.5:
cannot open URL ‘https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/bin/windows/contrib/3.5/PACKAGES
Packages which are only available in source form, and may need compilation of
C/C++/Fortran: ‘data.table’ ‘mxnet’
These will not be installed

When I try to install on the latest version of R ( 3.5.0) I get the following message:
Error: package or namespace load failed for ‘mxnet’:
package ‘mxnet’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

Hi,

I’ve just pushed a newly compiled version for Windows CPU built with R 3.5.0. You can install it with the following command:

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

1 Like

This really helps me as well and this one line was hard to find :slight_smile: thank you!