jupyterlab-desktop icon indicating copy to clipboard operation
jupyterlab-desktop copied to clipboard

Can't install R kernel in Jupyter Lab Desktop app

Open Dr-Albert-MD opened this issue 2 years ago • 6 comments

I have always used this procedure inside an R session for the standard jupyter lab R kernal installation: install.packages("devtools") devtools::install_github("IRkernel/IRkernel") IRkernel::installspec()

Anyway, the same procedure seems not to work for Jupyter Lab Desktop app. Any help is appreciated. Thanks

Dr-Albert-MD avatar Oct 13 '21 11:10 Dr-Albert-MD

To install R Kernel in JupyterLab Desktop follow the instructions in https://github.com/jupyterlab/jupyterlab-desktop/blob/master/user-guide.md#customizing-the-bundled-python-environment (i.e. set appropriate permissions to the environment) but then at the point, when %pip install scikit-learn example is suggested please instead run:

%conda install -c conda-forge r-irkernel

Please note that this will install a new copy of R from conda (which may use up a bit of space).

Please leave a comment sharing your experience: did it work for you? Is this what you would expect? Should we include it in the user guide, or do we need a different solution?

Tested on Ubuntu 21.10 with JupyterLab Desktop v3.2.1-2.

krassowski avatar Nov 04 '21 18:11 krassowski

I've tried this (on Windows 10) and it seems to have worked. However, it seems like I can only pick one kernel per notebook. Is it possible to use the R and python kernels side-by-side?

gal-lum avatar Nov 15 '21 19:11 gal-lum

Kind of. You can install rpy2 to access R from the Python kernel and then use magics see https://rpy2.github.io/doc/v3.4.x/html/generated_rst/notebooks.html

krassowski avatar Nov 15 '21 21:11 krassowski

It would be great to have details of how to install alternative kernels in the README or at least a link from the README to some instructions.

I've just followed this through on macOS with success.

AlasdairGray avatar Sep 09 '22 12:09 AlasdairGray

Hello there, can anyone please give directions on how to install the ijava kernel in JupyterLab desktop? I already have this kernel installed in web based jupyterlab, but I am wondering if the procedure is the same in JupyterLab for dektop.

Thank you!

orboan avatar Apr 01 '23 18:04 orboan

Kind of. You can install rpy2 to access R from the Python kernel and then use magics see rpy2.github.io/doc/v3.4.x/html/generated_rst/notebooks.html

let's try

  • open ~/Library/jupyterlab-desktop/jlab_server, find under it ‎⁨share⁩/jupyter/⁩kernels/
  • install kernel (I just did it with https://github.com/evcxr/evcxr/tree/main/evcxr_jupyter)
  • copied installed files into kernel directory
 $ butuzov  ~/Library/jupyterlab-desktop/jlab_server/share/jupyter/kernels
 > tree
.
├── python3
│   ├── kernel.json
│   ├── logo-32x32.png
│   ├── logo-64x64.png
│   └── logo-svg.svg
└── rust
    ├── kernel.js
    ├── kernel.json
    ├── lint-LICENSE
    ├── lint.css
    ├── lint.js
    ├── logo-32x32.png
    ├── logo-64x64.png
    ├── logo-LICENSE.md
    └── version.txt

2 directories, 13 files

now you have new kernel and you can use it!

image

butuzov avatar Jun 03 '23 08:06 butuzov