Why has Jupyter notebook kernel stopped working after RStudio package installation - jupyter

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.

Executing IRkernel::installspec() in R via Anaconda CMD prompt have resolved the issue. Note for others with this issue, you may be prompted to run install.packages(“rlang”) before.

Related

Jupyter Notebook Error: "Jupyter command `jupyter-notebook` not found."

I just downloaded vscode using homebrew and install python#3.11 using homebrew as well. I used pip3 install jupyter as I saw other recommend to fix this issue and still no luck. I have downloaded all the extensions on vscode and I have set the kernal to homebrew version of python and I still recieve this issue. Note that I have used notebooks in the past and have never gotten this issue so I am not really sure what it is this time. I have not installed anaconda.
I have tried uninstalling and installing the extensions but no luck. I have tried to pip3 uninstall jupyter, pip3 uninstall notebook and reinstall them and still no luck. I have tried to change the kernal to the default python3 on the mac and still nothing. My mac is m1 running on Ventura 13.2. I am able to run python code on regular python files just not using jupyter notebook. I followed the instructions how to set it up on vscode website but I got this error. Any help would be appreciated thank you.
I have same issue using VSCode on Mac OS.
VSCode's 'Jupyter' plugin is broken, causing VSCode unable to bind with python interpreter. Downgrading from v2023.1.2000312134 to v2022.11.1003412109 fixed my issue.
I had the same issue, running on m1 mac (Ventura 13.2). If you aren't already, make sure you are utilising a python virtual environment:
# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
Form your VSCode Command Palette (Shift+Command+P), search and then choose
Jupyter: Select Interpreter to Start Jupyter Server
You should then select the python version that is associated to your virtual environment (venv).

Run Julia from remote using Jupyter locally

I apologize if it is a trivial question, but I searched and I could not find the answer. My situation is the following:
I have access to a server through ssh tunnelling. The server has Julia installed but not jupyter.
My machine has both, and my code is mostly in jupyter notebooks and I wish to keep it that way.
I wish to be able to run my code on a julia kernel on the server, but editing from a Jupyter interface/ IJulia locally.
I have found several guides on how to launch jupyter from remote, but they do not apply since the server does not have jupyter installed. Similarly, I am aware I could convert my code in a julia script and run it, but I would rather keep the convenience of a notebook for editing.
Is this even possible to do?
Any help is very appreciated!

Setting up jupyter kernel in remote VSCode notebook

I am trying to run some notebooks in my virtual environment in the VSCode (remotely connected). I install the venv as usual via python3 -m venv <venv-name>, activate it and install all the needed modules. When I run which ipython I get the one from the venv so I install the kernel via ipython kernel install --name "<name>" --user and it is successfully created in ~/.local/share/jupyter/kernels/ directory and the kernel.json points to the venv python. Then I open the VSCode and select both the Python: Select Interpreter and Jupyter: Select Interpreter to start Jupyter server to point to the virtual environment's python, sth. like .../<venv-name>/bin/python3.
However, when I try to run the cell it wants me to select kernel (I can also do it myself in the upper right corner of the VSCode), but my newly created kernel is not there. There are only two (same) ones from usr/bin/python.
It is really strange since twice in two days my kernel magically appeared for one notebook and worked as desired, but when I opened a new notebook, my kernel was gone again. I tried to remove/reinstall kernels, venvs, VSCode's Python and Jupyter extensions but nothing helped. Any suggestions?
For now, I start the kernel in remote command-line via jupyter notebook --no-browser --ip=<ip> and then insert the connection link to Jupyter Server in the bottom right corner of the VSCode status bar but am wondering if there is an easier way since all the stuff (except VSCode) is on a remote machine?
This way is not easy. You can set up Jupyter Kernel easily.
Firstly, using ssh to connect to the remote server.
Secondly, open Command Palette (⇧⌘P) and enter Python: Select Interpreter, you can directly connecting to remote kernel.
resource: https://code.visualstudio.com/docs/datascience/jupyter-notebooks

How to setup custom jupyter kernels on WSL2?

I've been following https://queirozf.com/entries/jupyter-kernels-how-to-add-change-remove to create a jupyter kernel.
This procedure worked when I was on Ubuntu or WSL1.
However, I'm unable to change kernel on WSL2. Whatever custom kernel I select, the python and pip-packages seem to be pointing to the version where the jupyter notebook is launched and not the virtualenv associated to the kernel.
Does anyone know how to setup custom jupyter kernels on WSL2 ?
The recent update on my computer seemed to have resolved the problem

Troubleshooting: Kernel always dies using IJulia in IPython notebook

I recently began using julia, and I would like to use in with IPython Notebook/Jupyter.
So, I installed julia using MacPorts, i.e. sudo port install julia. Following the installation instructions here: https://github.com/JuliaLang/IJulia.jl
After the prompt, I used "Pkg.add("IJulia") to install IJulia.
However, I cannot use Julia with IPython notebook. After opening the notebook with
ipython notebook --profile=julia
the kernel for the julia notebook dies instantly and cannot be restarted.
The error on the Terminal shows:
[I 19:03:19.410 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel dc00ae3a-8fa6-4d01-a802-f7845a16a9ba restarted
ERROR: SHA256 not defined
in include at /opt/local/lib/julia/sys.dylib
in process_options at /opt/local/lib/julia/sys.dylib
in _start at /opt/local/lib/julia/sys.dylib
while loading /Users/NAME/.julia/v0.3/IJulia/src/kernel.jl, in expression starting on line 6
I suspect I have installed IJulia incorrectly? How can I solve this?
(The version of julia is julia version 0.3.11. The version of python is Python 2.7.10. The version of ipython is 4.0.0.)
The current stable version of Julia is v0.4.0.
You should download it directly from the Julia homepage (.dmg):
http://julialang.org/downloads/
Having done that, run it and do Pkg.add("IJulia") again.
Then from within Julia do
using IJulia
notebook()
Note that the Jupyter Notebook (the new name for what used to be the IPython Notebook) is run as
jupyter notebook
The --profile julia is no longer necessary and should be removed.
Furthermore, this (jupyter notebook) will only work if you had a previous installation of Jupyter, which seems to be the case. In this case, I suggest you upgrade it with conda, if you installed Anaconda, or with pip.)