You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@mxnet.apache.org by Mohammad via MXNet Forum <mx...@discoursemail.com.INVALID> on 2020/07/20 05:10:19 UTC

[MXNet Forum] MXNET installation in R on mac


Dear Developer,

I hope you are doing well and keeping safe in these exhausting days that the world is facing.

I have been trying to install `mxnet` on my mac since 10 days ago but I have many problems. My system info is as follow:
macOS Catalina version version 10.15.5
First I tried to install it by R3.6.2 and I got below errors:

1- > `install.packages("https://s3.ca-central-1.amazonaws.com/jeremiedb/share/mxnet/CPU/3.6/mxnet.zip", repos = NULL)`

`trying URL 'https://s3.ca-central-1.amazonaws.com/jeremiedb/share/mxnet/CPU/3.6/mxnet.zip'
Content type 'application/zip' length 31543727 bytes (30.1 MB)
==================================================
downloaded 30.1 MB

Error in install.packages : type == "both" cannot be used with 'repos = NULL'`

2-
`cran <- getOption("repos")`

`cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"`

`options(repos = cran)`

`install.packages("mxnet")`

`Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
installing the source package ‘mxnet’`

`trying URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_1.3.0.tar.gz'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/src/contrib/mxnet_1.3.0.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_1.3.0.tar.gz'
Warning in install.packages :
  download of package ‘mxnet’ failed`


3-
`install.packages("mxnet", repos=NULL, type = "source")`

 `Warning: invalid package ‘mxnet’

Error: ERROR: no packages specified
Warning in install.packages :
  installation of package ‘mxnet’ had non-zero exit status`

4-
`install.packages("mxnet")`

 `--- Please select a CRAN mirror for use in this session ---
Warning: unable to access index for repository https://mirror.las.iastate.edu/CRAN/src/contrib:
  cannot open URL 'https://mirror.las.iastate.edu/CRAN/src/contrib/PACKAGES'
Warning: unable to access index for repository https://mirror.las.iastate.edu/CRAN/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://mirror.las.iastate.edu/CRAN/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Warning message:
package ‘mxnet’ is not available (for R version 3.6.2)`


Then according the website info I changed my R version to R version 3.5.3 (2019-03-11) and I installed the package "mxnet" successfully using the following code:

`cran <- getOption("repos")`

 `cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"`

`options(repos = cran)`

`install.packages("mxnet")`

 `library(mxnet)`

but for loading the package I got the below error:

> `library(mxnet)`

 `[1] "Loading local: inst/libs/libmxnet.so"
Error: package or namespace load failed for ‘mxnet’:
 .onLoad failed in loadNamespace() for 'mxnet', details:
  call: dyn.load("R-package/inst/libs/libmxnet.so", local = FALSE)
  error: unable to load shared object '/Users/user/R-package/inst/libs/libmxnet.so':
  dlopen(/Users/user/R-package/inst/libs/libmxnet.so, 10): image not found`

My R info are as follows:
> `sessionInfo()`

R version 3.5.3 (2019-03-11)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.15.2

  `Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5         visNetwork_2.0.9   digest_0.6.25      jsonlite_1.6.1    
 [5] magrittr_1.5       rlang_0.4.6        stringi_1.4.6      DiagrammeR_1.0.6.1
 [9] RColorBrewer_1.1-2 tools_3.5.3        stringr_1.4.0      glue_1.4.1        
[13] htmlwidgets_1.5.1  compiler_3.5.3     htmltools_0.5.0 `

I run the following cods on terminal:
1- `brew install openblas`

Warning: openblas 0.3.10_1 is already installed and up-to-date
To reinstall 0.3.10_1, run `brew reinstall openblas`

2- `brew install opencv`

Warning: opencv 4.3.0_5 is already installed and up-to-date
To reinstall 4.3.0_5, run `brew reinstall opencv`

3- 
`ln -sf /usr/local/opt/openblas/lib/libopenblasp-r0.3.10.dylib /usr/local/opt/openblas/lib/libopenblasp-r0.3.10.dylib`

but it doesn't work, and I got below error again:

 `library(mxnet)`

 `[1] "Loading local: inst/libs/libmxnet.so"

Error: package or namespace load failed for ‘mxnet’:

 .onLoad failed in loadNamespace() for 'mxnet', details:

  call: dyn.load("R-package/inst/libs/libmxnet.so", local = FALSE)

  error: unable to load shared object '/Users/user/R-package/inst/libs/libmxnet.so':

  dlopen(/Users/user/R-package/inst/libs/libmxnet.so, 10): image not found`

Any ideas how to fix this issue?
Thank you.





---
[Visit Topic](https://discuss.mxnet.io/t/mxnet-installation-in-r-on-mac/6419/1) or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.mxnet.io/email/unsubscribe/066721d825ff4956751cf098f4846cc3c5b6a02b31d55ed8251975c36c8bd1fb).