Installing "mxnet" package

Good afternoon. Recently I have encountered the problem with installing "mxnet" package. I have tried several variants of code, but neither of their actually installs this package.

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

And get the error like this:

Error: package or namespace load failed for ‘mxnet’:
package ‘mxnet’ was installed before R 4.0.0: please re-install it

install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)

Then I type library(mxnet) and get the error as in p.1

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

require(devtools)

install_version("DiagrammeR", version = "0.9.0", repos = "http://cran.us.r-project.org")
require(DiagrammeR)

install.packages("mxnet")

After executing this code I get the following error:

ERROR: failed to lock directory 'C:/Users/user/Documents/R/win-library/4.0' for modifying
Try removing 'C:/Users/user/Documents/R/win-library/4.0/00LOCK-rlang'
Error: Failed to install 'unknown package' from URL:
  (converted from warning) installation of package ‘rlang’ had non-zero exit status
> install.packages("mxnet")
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES'
Installing package into ‘C:/Users/user/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘mxnet’ is not available (for R version 4.0.2)
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES'

In the end, mxnet package hasn't been installed in RStudio yet.

Could you, please, tell me, how to successfully install this package? What code should I run?

Thank you for your effort.

I think that in the early scenarios you omitted the text / error or fail from the install.packages command, and only showed error from library(mxnet)...
that said, your install,packages error log for the final scenario, is at least clear ...

ERROR: failed to lock directory 'C:/Users/user/Documents/R/win-library/4.0' for modifying
Try removing 'C:/Users/user/Documents/R/win-library/4.0/00LOCK-rlang'

If you're interested, when I run
cran <- getOption("repos") cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15" options(repos = cran) install.packages("mxnet") from p.1, all I get is this:

Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES'
Installing package into ‘C:/Users/user/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘mxnet’ is not available (for R version 4.0.2)
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/bin/windows/contrib/4.0/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/bin/windows/contrib/4.0/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/bin/windows/contrib/4.0/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/bin/windows/contrib/4.0:
  cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/bin/windows/contrib/4.0/PACKAGES'

In this respect, what should I do?

it seems that what you expected to be there simply isnt there... I can follow the url in the browser and find nothing... https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15/src/contrib/PACKAGES.gz

I guess you should try and follow this guide as close as possible, https://mxnet.apache.org/get_started/build_from_source, its unlikely I can help you much beyond that.

This is not a CRAN package sadly.

Generally, I have seen this page before and tried to follow the guidelines, presented there.

However, speaking about the part, which covers the topic of mxnet installation in R, I have tried to run

sudo apt-get update
sudo apt-get install -y r-base-core r-cran-devtools libcairo2-dev libxml2-dev

in R console, but when I did this, I got an error like: unexpected symbol in...

I don't understand, where I should run this code.

if you use a windows PC then you shouldnt follow the instruction for Linux installations.

The installation for Windows looks like the following:

Where should I run this:
choco install python git 7zip cmake ninja opencv ?

Should I first install this OpenBLAS? But actually on the release page there are only foldersand no installation programme itself.

when they are windows commands they should be run in a terminal.

I never heard of choco before but I googled https://chocolatey.org/
I never compiled openBLAS so I can't advise you.

Simple command line (Windows 8.1)?

yes, but for convenience Rstudio also provides a windows terminal, it shares the console pane.
I would say if you have a specific issues with non CRAN packages consider going to the development forum for the package in question. In this case that would be https://github.com/apache/incubator-mxnet

Thanks for the provided link, I'll see it.
In the command line running choco install python git 7zip cmake ninja opencv always fails.

you probably need to get yourself choco before you use choco

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.