Jupyter Notebook Kernel Issue

Hi All,
To date I have been using Jupyter Notebook to run R and sometimes Python code. I have also been using RStudio at times. Recently, while using RStudio, I was prompted to install some package (cannot exactly remember). At any rate, I installed this package. Dont know if only coincidence, but trying to run R in the notebook resulted in kernel not connecting. I found the same issue with Python, the Python kernel is also not connecting anymore.

Executing the below, I get;
(base) C:\WINDOWS\system32>jupyter kernelspec list

Available kernels:
ir C:\Users\Admin\AppData\Roaming\jupyter\kernels\ir
python3 C:\Users\Admin\anaconda3\share\jupyter\kernels\python3

How do I get Jupyter Notebook’s kernels to work again.

You may need to install kernel spec again (from R run IRkernel::installspec()) or install IRkernel if it is not installed. This sometimes happens when your installed R version changes.

Thank you for your reply.

At first running IRkernel::installspec() from the RStudio console I get the below:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 1.0.4 is already loaded, but >= 1.0.6 is required

I then run install.packages(“rlang”) which seems to resolve this. Executing IRkernel::installspec() again I get the below error message;

Error in IRkernel::installspec() :
jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127.
In addition: Warning message:
In system2(“jupyter”, c(“kernelspec”, “–version”), FALSE, FALSE) :
‘“jupyter”’ not found

I do have Jupyter notebook installed, in fact it has been installed for years. Not sure what to do next.

Hi Krassowski,
Just an update, rather than executing the above in RStudio, I did it in R via anaconda CMD prompt. Seems to have resolved the R kernel issue in Jupyter notebook. I am still trying to get the Python kernel to respond in Jupyter notebook, what course of action would you suggest?