You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/01/28 00:05:05 UTC
[GitHub] wittyalias opened a new issue #14004: unable to load mxnet library
in R
wittyalias opened a new issue #14004: unable to load mxnet library in R
URL: https://github.com/apache/incubator-mxnet/issues/14004
Possibly related to the issues in [#13952](https://github.com/apache/incubator-mxnet/pull/13952).
I've followed the [instructions ](https://mxnet.incubator.apache.org/versions/master/install/index.html?platform=MacOS&language=R&processor=CPU) to install CPU version of MXNet for R on MacOS (10.14.2).
I successfully install openblas (0.3.5) and opencv (4.0.1) via brew using
```
brew install opencv
brew install openblas
```
Also, added the symbolic links as suggested (this is a different openblas version that I have installed):
```
ln -sf /usr/local/opt/openblas/lib/libopenblas.dylib /usr/local/opt/openblas/lib/libopenblasp-r0.3.1.dylib
```
And then installed the package within R with:
```
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"
options(repos = cran)
install.packages("mxnet")
```
## Description
When I try to load the mxnet library I get an error message below
```
>library(mxnet)
Error: package or namespace load failed for ‘mxnet’:
.onLoad failed in loadNamespace() for 'mxnet', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/mxnet/libs/libmxnet.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/mxnet/libs/libmxnet.so, 10): Library not loaded: /usr/local/opt/openblas/lib/libopenblasp-r0.3.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/mxnet/libs/libmxnet.so
Reason: image not found
```
## Environment info (Required)
I'm using R in RStudio 1.1.463
```
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.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
[7] base
```
## What have you tried to solve it?
1. My guess is that its looking for different versions of openblas and opencv than I have installed, so I tried to install a previous versions of them via brew, but I can't figure out how to do it for openblas and 3.4 opencv installs to a folder 'opencv@3' - so the library won't be able to find it anyway.
I did not change the symbolic link because before I had the openblas 0.3.1 error, I had a very similar looking error that said it couldn't find opencv 3.4.
I was thinking of cloning the repository and seeing if I could change what openblas and opencv versions mxnet looks for, but that seems like a lot of work for something that you may already be looking into.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services