Thursday, June 23, 2016

Installation of "mxnet" package for R on Ubuntu 16.04

I've spent a few hours trying to install "mxnet" package for R. I have looked at different sites, applied different steps. As result I've seen a lot of messages on my screen that something is missing or a provided url is invalid and my attempts for the installation had failed. Finally I found this site, with "R Package Installation" section:

http://mxnet.readthedocs.io/en/latest/how_to/build.html#

But I still have troubles. So there was no choice but to read all the error messages!

It turned out that I needed a bunch of libraries which are usually used by developers. I guess that people who wrote instrustions are developers and they already have all the libraries. So when they wrote instructions they did not think of them.

 Installation of libraries I needed on Ubuntu:

sudo apt-get install libssl-dev 
sudo apt-get install libssh2-1-dev

In addition I've installed a few packages in R shell (invoking it by "sudo R") as well, because they were asked for.
I'm not sure if they all must be installed for "mxnet".  Maybe my order of steps was not optimal. Or maybe there are other required libraries which I already have.

install.packages("shiny")
install.packages("httr")
install.packages("openssl")
install.packages("devtools")
install.packages("imager")

 At the very end I finally got to unpack and install the mxnet package. Well, not a boring simple step here as well. A command in the "R Package Installation" section on the site mentioned above was for earlier version:

R CMD INSTALL mxnet_0.5.tar.gz 

While I should use:

R CMD INSTALL mxnet_0.7.tar.gz

Now I need to look somewhere for R tutorials, because on the site they have only Python tutorials. Although some basic options must be the same.

No comments:

Post a Comment