Thursday, November 6, 2025

How to enable R kernel in Ubuntu of WSL2

1. Activate WSL2

2. Install Ubuntu

3. sudo apt update

4. sudo apt install python3-venv

5. python3 -m venv ~/jupyter_env

6. source ~/jupyter_env/bin/activate

7. pip install jupyter

[8, install R

sudo apt install r-base-dev build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev

[9. install IR

10. install.packages("tidyverse", "devtools", "IRkernel")

(watch for errors of missing dependencies. may have to redo sudo apt and R install.packages() a few times,

11. q()

12. jupyter lab

13. jupyter notebook