Incubator-mxnet: MxNet with R on Windows : DiagrammeR dependency isn't resolved properly

Created on 8 Mar 2018  Â·  5Comments  Â·  Source: apache/incubator-mxnet

Very recent few questions with a problem of installing R - MxNet on Windows with the same problem: DiagrammeR cannot be installed properly:

  1. https://stackoverflow.com/questions/41132794/using-mxnet-pre-trained-image-classification-model-in-r/49122166#49122166
  2. https://stackoverflow.com/questions/41132794/using-mxnet-pre-trained-image-classification-model-in-r/49122166#49122166
  3. https://stackoverflow.com/questions/49171322/r-object-set-global-graph-attrs-is-not-exported-from-namespacediagrammer/49179507#49179507

Description

Cannot install R MxNet on Windows because of a dependency with DiagrammeR. Has to install it separately first.

Environment info (Required)

R

Session Info:

R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server >= 2012 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3

Error Message:

> require(mxnet)
Loading required package: mxnet
Error: package or namespace load failed for ‘mxnet’:
 object ‘set_global_graph_attrs’ is not exported by 'namespace:DiagrammeR'

Minimum reproducible example

install.package('mxnet')
require(mxnet)

Steps to reproduce

(Paste the commands you ran that produced the error.)

  1. Install mxnet for R via RStudio
  2. Try to include the library via require

What have you tried to solve it?

Install DiagrammeR separately with version 0.9.0 fix the issue (another guy from stackoverflow used 0.9.2 and it also worked)

# 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)
Installation R Windows

Most helpful comment

@jeremiedb I was facing the same issue.
install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)
This patch works like a charm

All 5 comments

@nswamy @jeremiedb

DiagrammeR 1.0.0 brought on incompatibility with the graph.viz. This has been fixed in the master, but creates issues with the Windows pre-compiled packages that haven't been updated for a while.

Winodws CPU package of Mxnet 1.2.0 which includes the patch can be downloaded here:
install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)

Not sure if this version could be uploaded to the official mxnet repo?

@jeremiedb I was facing the same issue.
install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)
This patch works like a charm

Hi @Ishitori The official repo has now been updated and the instructions on official MXNet installation page for R works. Could you please verify if it works for you and close the issue

Yes, I followed the official instructions, and now it works fine. Thanks all.

Was this page helpful?
0 / 5 - 0 ratings