Reputation: 403
I am trying to install MXNet / MXNetR on Windows. To do so I did the following, which is recommended on their website (https://mxnet.incubator.apache.org/install/windows_setup.html)
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"
options(repos = cran)
install.packages("mxnet")
This worked just fine. Then I tried to load the library, which gives an error:
library(mxnet)
Error: package or namespace load failed for ‘mxnet’:
Object ‘set_global_graph_attrs’ is not exported by 'namespace:DiagrammeR'
I googled some more and the only help I could find was to try the following, which gave the same error:
library(devtools)
install_version("DiagrammeR", version = "0.9.1", repos = "http://cran.us.r-project.org")
Trying an even earlier version of DiagrammeR also didn't work:
library(devtools)
install_version("DiagrammeR", version = "0.8.1", repos = "http://cran.us.r-project.org")
I could not find any more help, how to deal with this error. I would be glad if someone has an idea.
Upvotes: 2
Views: 874
Reputation: 924
Try this:
library(devtools)
install_version("DiagrammeR", version = "0.9.2", repos = "http://cran.us.r-project.org")
library(DiagrammeR)
library(mxnet)
It works on my system. Apparently mxnet wants you to load DiagrammeR before it will load. This command shows the help for the function in question from DiagrammeR, which may help you to further troubleshoot.
?set_global_graph_attrs
Proof mxnet works:
> a <- mx.nd.ones(c(2,3), ctx = mx.cpu())
> b <- a * 2 + 1
> b
[,1] [,2] [,3]
[1,] 3 3 3
[2,] 3 3 3
Upvotes: 2