Jupyter notebook with R kernel

I am trying to run a jupyter notebook with an R kernel. The nixos wiki contains instructions here: R - NixOS Wiki.

But if I try those then I get

sh: jupyter: command not found
Warning message:
In system2("jupyter", "notebook") : error in running command

Which nixpkgs revision are you working from? I just built the Wiki-supplied expression on a4d6a3f724979bba7bf0adf7fc1f0584f9094497 and it builds and starts fine. Are you on NixOS or are you using Nix on another distro?

nix-shell --pure -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz

I added

buildInputs = [ jupyter-R-kernel pythonPackages.jupyter ];

and this works on both ubuntu and macOS. I’ve updated the wiki.

2 Likes

I now get this on macOS :frowning:

configure: error: Platform surfaceless requires libdrm >= 2.4.75
builder for '/nix/store/2scpxw8yic4f46qa0bz8msz7w5b3srlx-mesa-noglu-18.3.4.drv' failed with exit code 1
cannot build derivation '/nix/store/yjwhiqxyblmwrp6hd0n49z53qxgbnavc-libGL-1.0.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xi0z0q0fg7k7qb6xqjn7sg8g166ycjvh-libdevil-1.7.8.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/n9f734z7wn1lx1bj9pgqqya7pk5n0lnb-graphviz-2.40.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7mb3b2h8z3089w67pb7f6vkp15kkvpz8-R-3.5.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7nffr6n76s7gjmc7hckgqjcr3wfzf2jy-R-3.5.2-wrapper.drv': 1 dependencies couldn't be built
error: build of '/nix/store/7nffr6n76s7gjmc7hckgqjcr3wfzf2jy-R-3.5.2-wrapper.drv', '/nix/store/c4ymm9m7fy5vmcxyg71rviayq7i0pgif-jupyter-R-kernel.drv' failed

unstable really is unstable so I pinned to a hash from last week.