Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install R kernel in Jupyter Lab Desktop app #304

Open
Dr-Albert-MD opened this issue Oct 13, 2021 · 6 comments
Open

Can't install R kernel in Jupyter Lab Desktop app #304

Dr-Albert-MD opened this issue Oct 13, 2021 · 6 comments

Comments

@Dr-Albert-MD
Copy link

Dr-Albert-MD commented Oct 13, 2021

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 Dr-Albert-MD changed the title How install R kernel in Jupyter Lab Desktop app? Can't install R kernel in Jupyter Lab Desktop app Oct 22, 2021
@krassowski
Copy link
Member

krassowski commented Nov 4, 2021

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.

@gal-lum
Copy link

gal-lum commented Nov 15, 2021

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?

@krassowski
Copy link
Member

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

@AlasdairGray
Copy link

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.

@orboan
Copy link

orboan commented Apr 1, 2023

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!

@butuzov
Copy link

butuzov commented Jun 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants