mohamadmaarouf_
mohamadmaarouf_

Reputation: 47

R Kernel on VSCode Jupyter Notebook not appearing

I'm trying to use an R Kernel on a Jupyter Notebook on VSCode, and the R Kernel is not appearing. I can only see Python.

I opened R studio, R in powershell, and R in VScode terminal and tried running the following code:

install.packages('IRkernel')
IRkernel::installspec()
# Also tried: IRkernel::installspec(user = FALSE)

Both ran successfully. If I run "jupyter kernelspec list" you can see:

ir:
C:\Users\000\AppData\Roaming\jupyter\kernels\ir
ir33:
C:\Users\000\AppData\Roaming\jupyter\kernels\ir33
python3:
C:\Users\000\AppData\Roaming\Python\share\jupyter\kernels\python3

However, when I navigate back to VSCode, open a new Jupyter notebook, and try to switch the kernel from Python to R, nothing appears.

When I run "Jupyter Notebook" from command prompt and the Jupyter Notebook web browser opens up, I can see both the "R" and "R 3.3" kernel appear, and they connect and run successfully.

Upvotes: 2

Views: 2785

Answers (1)

mohamadmaarouf_
mohamadmaarouf_

Reputation: 47

I solved my problem by updating my visual studio. I was getting a popup saying my visual studio needed an update, so i updated it, and with the new update, there was an option to choose a jupyter kernel which showed my R kernels. I'm not sure if this was a Cache issue on the Visual Studio side which was solved by the reload after the update, or simply an issue that was fixed in an update.

Upvotes: 0

Related Questions