Using R and conda

As I mentioned elsewhere, Nix is a great way to install and maintain software with dependencies. The drawback is you (briefly) need root access during the initial install to create /nix directory. After that you don't need root access ever. The upside is everything you install with nix is compatible so, for instance if you do

nix-shell -p R rPackages.dplyr rPackages.rJava python pythonPackages.numpy --run R

you will get a sandbox environment with R, dplyr, rJava (with correct version of JRE), python, and numpy where everything works regardless of whether your host OS have correct java, shared libraries, etc. or not.

We do have anaconda for purely python projects because the learning curve is lower but it is often painful to use for the reasons you mentioned so we are gradually moving towards using nix for everything.

1 Like