MXNET for R 3.6

I am installing MXNET R package on windows following the instruction trying to use a pre-built binary:

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

I got this error message:

Warning: unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/bin/windows/contrib/3.6:

Will you have mxnet for R 3.6?

Thank you in advance for your help.

Thanks for your message @LaranIkal, @jeremiedb do you know if MXNet is available for R 3.6?

Having the R 3.6 support should just be a matter of updating the S3 repo. I think @hetong007 was performing it?
@LaranIkal are you looking for the CPU or GPU version? As a quick fix I could make a build tomorrow and post a link to access it.

1 Like

Hello,

Thank you for all the attention to my message.

I am looking for the CPU version please.

@LaranIkal Here’s the link for downloading a CPU built on Windows with R 3.6.0. It’s the very latest MXNet release 1.5.0.
https://s3.ca-central-1.amazonaws.com/jeremiedb/share/mxnet/CPU/3.6/mxnet.zip

Package can be installed directly:

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

Thank you @jeremiedb for all your help, I have installed mxnet, the installation process worked fine.

I will start testing using autoencoders for anomaly detection, I will let you know if some problem comes up.

Thank you @ThomasDelteil for the follow up.

Regards.

Hi @jeremiedb !

Would it be possible to provide a similar link for installing MXNet on Mac OS X? I have the same problem: trying to install it for R 3.6.0.

Thank you!

Fails on macOS.

> install.packages("https://s3.ca-central-1.amazonaws.com/jeremiedb/share/mxnet/CPU/3.6/mxnet.zip", repos = NULL, type="source")
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 rawToChar(block[seq_len(ns)]) : 
  embedded nul in string: 'PK\003\004\024\0\0\0\0\0\xa2\xa0\xa8N\0\0\0\0\0\0\0\0\0\0\0\0\006\0\0\0mxnet/PK\003\004\024\0\0\0\0\0r\xa0\xa8N\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0mxnet/demo/PK\003\004\024\0\0\0\b\0r\xa0\xa8N\x85\xe1\xa2\rQ\002\0\0\037'
Warning in install.packages :
  installation of package ‘/var/folders/40/_cbf9y0936x52h1fk8tlvrlm0000gn/T//Rtmp7l3sMe/downloaded_packages/mxnet.zip’ had non-zero exit status
> install.packages("https://s3.ca-central-1.amazonaws.com/jeremiedb/share/mxnet/CPU/3.6/mxnet.zip", repos = NULL, type="binary")
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 : file ‘/var/folders/40/_cbf9y0936x52h1fk8tlvrlm0000gn/T//Rtmp7l3sMe/downloaded_packages/mxnet.zip’ is not a macOS binary package

Hello.

I’m trying to install the latest mxnet for GPU (Cuda 10.0, cudnn 10.0) on R 3.6 on Windows 10 1903, but I’m having the same problem:

Warning: unable to access index for repository https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/GPU/cu100mkl/src/contrib:
cannot open URL ‘https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/GPU/cu100mkl/src/contrib/PACKAGES

Hi @jeremiedb !

Would it be possible to provide a similar link for installing MXNet on Mac OS X? I have the same problem: trying to install it for R 3.6.0.

Thank you!

Hi @N1h1l1sT
Could you give a shot at installing with this command:

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

I’ve just tried it after an update to Cuda 10.1 and still works fine on Windows with R 3.6.0.
It’s a built of MXNet 1.3.1, I’ll look for an update to 1.5.1 shortly.

Hi @lynne, are you looking for a CPU or GPU install? I unfortunately don’t have a direct access to a Mac, but if it’s for CPU, I might be able to give a shot at it in the upcoming week.
In the meatime, perhaps a bit hacky, but if you have a version of R 3.5 installed and make the installation of MXNet for which I think exist for OS X, then you will likely be able to use the library on R 3.6.0 by simply copy paste the mxnet package folder under the R library folder from 3.5 to 3.6.

@hetong007, aware of any official support for for Mac OS X? Also a Windows built on the official aws repo? Let me know if I can push Windows built on it.

Hi @jeremiedb, thanks for your attention and quick reply. I’m looking for the CPU version, and I got the the same problem when trying to install mxnet for both R 3.5 and 3.6. I tried to downloaded mxnet_1.3.0.tar.gz and sucessfully installed it in RStudio environment. But when I library(mxnet), I got the following error message:
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

And then I tried to do as follows:
brew upgrade openblas
brew upgrade opencv
ln -sf /usr/local/opt/openblas/lib/libopenblasp-r0.3.3.dylib /usr/local/opt/openblas/lib/libopenblasp-r0.3.1.dylib

but I failed in the library (mxnet).

Hello,
I wonder if something similar is available also for linux. I am on debian and I have R 3.6 and I am experiencing problems in building from source according to

(the R part fails on my system).

I am getting this 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:/Progs/R/R-3.6.0/library/mxnet/libs/x64/libmxnet.dll’:
LoadLibrary failure: The specified module could not be found.
which seems weird since I checked the directory path and libmxnet.dll actually IS inside there

I am not able to install mxnet for R 3.6.

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

this worked for me

Hi @jeremiedb
I met an error after using the installing URL(GPU), while my Cuda version was 10,R version was 3.6.1
Could u please tell me how to deal with it?

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:/R/R-3.6.1/library/mxnet/libs/x64/libmxnet.dll’:
LoadLibrary failure: 找不到指定的模組。

Hi,

Have you tried the official procedure mentionned here:

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

If there’s an issue with the above, I’ev updated a precompiled Windows version for MXNet 1.5.1 built on 3.6 that you could install with the following:

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