Install IJulia offline - jupyter-notebook

I would like to install IJulia from a non-connected computer. However, the command Pkg.add("IJulia") seems to require a connection. Is there a way to download manually the package and then specify a local path for the install?
Thanks in advance,

That would be a problem for all the Julia packages you want to install, not only IJulia. Julia packages work by cloning stuff into ~/.julia/v0.4 and ~/.julia/v0.4/.caches (for julia 0.4 at least) you will need to grab all the things and put them in the right place yourself.
Something else you can do is to use the insteadOf option of git so that Pkg believe it is pulling things from github, when you actually have a local clone of the repository.
You can find some information on installing packages (and configuring insteadOf for git) in this section of the julia manual.

Related

Air-gapped env- Installing R package source vs binaries

We have a ubuntu linux server in our office which is a air-gapped environment. There is no internet access to external network.
However I would like to install few R packages like ggplot2, Database Connector, dplyr, Tidyverse etc. I have more than 10-15 packages to download
While I cannot write the usual command install.packages("DatabaseConnector"), I have to download the zipped folders from CRAN as shown here.
I am new to R. So, can you help me with my questions given below?
a) Why is there are no files for linux systems? I only see windows binaries and macOS binaries. Which one should I download?
b) Should I download binaries or package source? which one is easy to install?
c) When I download packages like above as zipped file from CRAN like shown here, will the dependencies be automatically downloaded as well? Or should I look at error messages and keep downloading them one by one?
d) Since I work in a Air-gapped environment, what would be the best way to do this process efficiently.
Under linux packages are always installed from source. There are no official binary packages for linux. However, your distro might offer some of them in the official repositories. Ubuntu does. However these tend to be quite old versions and usually limited to a handfull of the most important packages. So, for linux you have to download the source packages. The zip files are for windows and will not work.
You will also need to download all of the dependencies of the packages. For something like tidyverse this will be a huge number. Tracking those by hand is a lot of work. Easiest is probably to use a package like miniCRAN outside of your airgapped system to build a selective copy of CRAN. You can specify the packages you want and the package will download all dependencies. You can then copy the downloaded directories to your server, point install.packages in the right direction and install as usually using install.packages. For details see https://andrie.github.io/miniCRAN/articles/miniCRAN-introduction.html.
You might also run into the problem that your system does not have all of the depencies needed to build all of the packages. Under ubuntu you need for example to install libxml2-dev to be able to install the xml package. For that you need to use the package manager of ubuntu. How to do that on an airgapped system is another issue

Precompile R packages for specific Linux flavor

We have established a simple local CRAN-like repository for R packages. There are many users, all of which use the same version of Linux.
Is there a way of convincing R to provide pre-compiled Linux packages instead just source ones? The compilation step takes a considerable amount of time for anyone using our repository. It should be possible to precompile and reuse the same binaries, since we can guarantee that the Linux version is consistent for all users.
How could one hack something like this together?
In the very narrow sense of "all of which use the same version of Linux" you actually have an option (that happens to be relatively littler known). Create binary packages using e.g.
R CMD INSTALL --build nameOfDirectoryWithSources
As R CMD INSTALL --help says it
--build build binaries of the installed package(s)
and these are not .deb or .rpm alike packages: no dependency information or alike is added. But they do exactly what you ask for: save on compilation time.
I am not aware of a repository structure one can build of this though.

Error Installing IJulia - Unknown Package

I installed the Anaconda package and then tried to install the IJulia package and I get:
As you can see Update didnt work either, which was the only possible instruction I could find upon a quick search...
Thanks.
There seems to be something wrong in your Julia installation.
The easiest thing to do (although a bit drastic) is probably to delete the .julia directory in your home directory and try again. The installed packages are stored in that directory, so deleting it will "reinitialise" the package manager.
Note also that it is no longer necessary to separately install Anaconda in order to use IJulia -- if it does not find a Jupyter installation, it will install the required packages itself.

Offline Install of R on RedHat

I am trying to install R on a RedHat server with no connectivity to the Internet. (sigh)
Initially, I tried with R meta package from EPEL (http://fedoraproject.org/wiki/EPEL).
Due to dependency requirements, I downloaded dependancies Rcore ,libRmath, etc...
Each time it prompts for a dependency, I download, transfer and install.
This takes time and manual effort.
Is there a cleaner way to do this than the manual download, transfer and install of every single dependency?
Note: The server has no internet connection, so yam is not helpful.
Have you thought of simply compiling R from source?
I usually do that, and it is relatively painless.
The thing is that when you do the ./configure step
you should get a list of all librarires that you
need before you issue make.
It might be less of a hazzle than the redhat install
you are doing.
I believed we are unable install R without online (unless there was someone download the installer and pass to you). You can refer to Setup ®Studio Server (CentOS/RHEL 7). Hope this helps.
One thing you could do is install R on a server with internet access.
Install Rtools.
Then you install all the packages you need with the option destdir of install.packages.
You will then get a folder with all the packages you will need.

most common config flags for installing R from source on 64-bit Ubuntu

I'm convinced that using Dirk's package is the best way to install and maintain R on an Ubuntu system. But I want to have some fun and get used to installing R from source.
What are the most common configure flags to use when installing?
Also, if I want to install 2.14.1 and I have 2.14.0 currently installed (which was installed from source), should I first uninstall 2.14.0?
There was a recent thread somewhere about having several versions---one from the apt-get repo, one in /usr/local. Try to find that...
Otherwise, I will roll up 2.14.1 on Friday morning, Michael will do his magic and the repo will have .deb packages of 2.14.1 'real soon', sometimes within a day.
Lastly, you can see which flags are used by getting the package sources for which you just do apt-get source r-base (and that works for any Debian/Ubuntu package that way if you have source references in apt's file.
Edit: By the way, regarding the '64-bit' aspect of your question: Nada. We don't do anything differently. It is "merely" the host OS being more generous with resources. But R finds all it needs to know on its own via its configure etc logic.

Resources