1

I wanted to install Mxnet library and found on this forum the topic where was described how do it .

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

and then i got the error

Error: package or namespace load failed for ‘mxnet’:
 object ‘set_global_graph_attrs’ is not exported from 'namespace:DiagrammeR'

what's wrong? DiagrammeR library is installed.

psysky
  • 3,037
  • 5
  • 28
  • 64

2 Answers2

4

There is some weird thing goes with mxnet installation on windows. I also experienced that problem a few days ago. What helped me is to install diagrammeR 0.9 manually:

# Make sure you have devtools installed already
require(devtools)
install_version("DiagrammeR", version = "0.9.0", repos = "http://cran.us.r-project.org")
require(DiagrammeR)

And after doing that, try to install mxnet - now it should work. Let me know if it helps.

Sergei
  • 1,617
  • 15
  • 31
0

I had exactly the same problem with loading mxnet. Your suggestion of installing DiagrammeR manually seems to have fixed it. Unfortunately, it simply exposed another error.

Error: package or namespace load failed for ‘mxnet’:
 .onLoad failed in loadNamespace() for 'mxnet', details:
 call: inDL(x, as.logical(local), as.logical(now), ...)
 error: unable to load shared object 'C:/Users/steve/Documents/R/win-library/3.4/mxnet/libs/x64/libmxnet.dll':
LoadLibrary failure:  The specified module could not be found.

I think the "onLoad" function must be missing. The dll referenced above, libmxnet.dll, is exactly where it should be.

  • I have some additional information. The current version of DiagrammeR is 1.0.0. That causes the error that D.Joe and I both experienced today. Sergei's suggestion reinstalls version 0.9.0, which appears to fix the error. However, for me that introduced other errors, per my comment above. It seems to me that mxnet needs to be updated for the current build of DiagrammeR. – Steven Shafer Mar 09 '18 at 01:29
  • Yes Sergei's decision fixes trouble – psysky Mar 09 '18 at 09:30