Windows 11. I have an Anaconda installation of Python and use both Jupyter Notebook and Spyder occasionally. Everything was fine last week. Now suddenly, I have something similar happening to what's being described here: Jupyter Notebook - Cannot Connect to Kernel
But Spyder is also immediately crashing after opening. I tried conda update jupyter and conda update notebook, a substantial number of packages updated, but same problem. I also tried to revert tornado to 5.1.1 but that was incompatible with the current version of Python I have, 3.10.8.
I tried to search for some ill-named or placed Python scripts, but there really shouldn't be any, they're all in folders in the host Jupyter Notebook directory. And I don't really understand Python environments or want to keep track of them so I'd rather not attempt that (one of the answers of the previous post).
enter image description here
I deleted Anaconda because it was causing more issues than solving in working with other editors like Sublime, PyCharm, etc...
In class, we have a lot of Jupyter notebooks. Is there a program that allows me to run Jupyter Notebooks just like Anaconda allowed me to? Basically the same User Interface where Cntrl + Enter runs a block a code?
Thanks.
Edit: I figured it out. I needed to downgrade Python from 3.8 to 3.7
Jupyter can be installed separately to Anaconda using pip via pip3 install jupyter - see the Jupyter page for more information.
I was able to use jupyter notebook 4 days ago. The only thing that changed was there was a firefox version update.
After that the server crashes everytime .ipynb files are opened. Even the directory will have a server error. I tried it both on Firefox and Google Chrome, both browsers will crash the server.
My only kernel is python3 and it always says "Kernel Busy". I tried resetting my pc and the jupyter notebook, but nothing seems to work.
The console showed:
The last 2 lines are causing the crash but I don't know how to fix it
When I type conda install jupyter in the anaconda prompt, I get something before it finishes as shown below. Maybe it might have a cause as to why it is having issues:
I created a new python environment and installed python, matplotlib, pandas, jupyter and it still crashes
Please uninstall and re-install all the below items:
ipykernel
ipython
jupyter_client
jupyter_core
traitlets
ipython_genutils
Additionally, if you're going to install with conda, follow below command.
run conda clean -tipsy
This command will clean up conda caches before you start.
Reference:
https://github.com/jupyter/notebook/issues/1892
Do you let Jupyter start the browser? If so, disable that and start the browser manually. I don't see how the zmq error messages could be related to the browser startup, but since you say that the only change was a browser update, that's worth a shot.
Check which version of pyzmq is installed. If Jupyter Notebook and the kernel are in different conda envs, check both and make sure they are on the same version and build. Try upgrading or downgrading to different versions. According to Anaconda issue 8932, there are problems with pyzmq on Windows. And a new build for win32 was released about two weeks ago - though I would expect win64 builds to be used nowadays.
I also found some recommendations for a similar error message to yours in Spyder issue 6097. The first one is to try without firewall and/or antivirus. You might have picked up a new firewall rule unknowingly. Trying different versions of pyzmq is also mentioned there.
I am sharing this solution in case someone needs it in the future.
I have just faced the same problem a hour ago. This was the message I was getting in the terminal. And the jupyter keeps restarting.
ModuleNotFoundError: No module named 'html.entities'; 'html' is not a package
[I 00:44:32.436 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
After Searching through the internet when I can not find the solution. I fixed it by removing the .HTML files I had in the directory. After moving those file jupyter started working parfectly.
I just had a similar problem - for me, it was casued by a non-existing %temp% directory (I have %temp% mapped to a ram disk, and the temp folder on it wasn't created yet).
Creating the folder pointed to by %temp% solved the issue.
All my environments were working totally fine but suddenly after restarting the system, the jupyter notebook from an environment was not opening or it was suddenly crashing. Tried form anaconda prompt but getting "Unable to create Process...
All my DL dependencies were on this environment and I didn't want to create new environment completely installing all the required dependencies.
Solution: I opened the Anaconda Navigator and cloned old_env to new_env and it worked magically. I could able to open the jupyter notebook successfully and all dependencies were working fine. Hope it helps
My code was running fine before I did not change anything and I ran it again. Now it doesn't return anything not even an error. It is just stuck on "In [*]".
This means that Jupyter is still running the kernel. It is possible that you are running an infinite loop within the kernel and that is why it can't complete the execution.
Try manually stopping the kernel by pressing the stop button at the top. If that doesn't work, interrupt it and restart it by going to the "Kernel" menu. This should disconnect it.
Otherwise, I would recommend closing and reopening the notebook. The problem may also be with your code.
updating ipykernel did it for me. it seems arch linux's ipykernel package had been outdated for some time
just do pip install --upgrade ipykernel
reference here: github solution
I have installed jupyter with command pip3 install jupyter and have the same problem. when instead I used the command pip3 install jupyter ipython the problem was fixed.
pip install ipykernel --upgrade
https://github.com/jupyter/notebook/issues/1133
I had the same problem and not any of the above mentioned solutions worked.
Until I updated conda packages:
conda update conda
conda update anaconda
and ... Voila! It all works!
The answers that state that your kernel is still executing the code in the cell are correct. You can see that by the small circle in the top right. If it is filled with a black/grey color, then it means it is still running.
I just want to add that I experienced a problem in JupyterHub where the code in the cell would just not execute. I stopped and restarted the kernel, shutdown and reloaded the notebook, but it still did not run.
What worked for me was literally copy pasting the same code to a new cell and deleting the old one. It then ran from the new cell.
This is mean your program is still running in background, you need to click shutdown (Shown in attached Image).
*** Shutdown the Running cell and again run your program.
I fixed this issue
just only type this command: jupyter notebook --no-browser
It will show you the path then copy and paste on Jupyter Notebook browser
The code will be executed in IPython Notebook Python 3
Usually, stopping and restarting that particular cell fixes this issue.
I had the same issue now:
Solved it by:
Just reloading the local weblink in which the Python is running
http://localhost:8888/notebooks/sec%201/Untitled.ipynb
Upgrading ipykernel, notebook and then downgrading tornado to 4.2.0 solved the issue for me.
My current package versions related to jupyter:
jupyter==1.0.0
jupyter-client==5.2.2
jupyter-console==6.1.0
jupyter-core==4.4.0
jupyterlab==2.2.5
jupyterlab-server==1.2.0
ipykernel==5.3.4
notebook==5.2.2
tornado==4.2
pyparsing==2.4.2
ipython==5.5.0
ipython-genutils==0.2.0
prompt-toolkit==1.0.15
Github
I had the same issue. I found that ipython must be running for jupyter notebook to execute.
Do the following:
Go to the folder where you have your ipython notebook(.ipynb)
Press shift and right click on the empty space then select "open command window here". This will open a command prompt window.
Type ipython. This will start ipython.
Open another command prompt window and open jupyter notebook.
Open your file again and go to cell>>>run cell.
This should work. It worked for me. Cheers!
This is because when we run a loop until it's termination the Kernel is in busy state and so IN [*] is shown up. Since Kernel is busy and if we just leave that cell to execute completely and switch to another cell to run, the corresponding cell will get busy and so again for that cell IN[*] is shown.
In that case you just need to restart your jupyter notebook and all is fine then.
But be sure that your loop will terminate this time or else again this error will turn up.
I have uninstalled jupyter, notebook and ipython, and installed jupyterlab. It is working for now (with just a few libraries installed and Python 3.6.8.
Something to discard: Uninstalling Python 3.7 completely with his libraries and reverting to 3.6 doesn't fix it, although it improves it, it works intermittently now (but once sth doesn't work properly, things start to get worse and worse, so I did the above).
Check the output on the server environment from which jupyter notebook was launched if you can. You'll probably find error messages and print() results.
Anaconda environments might cause this. I had to deactivate all conda environments and launch the notebook from root.
conda deactivate
To do so, cd into the directory in your terminal, run conda deactivate until there is nothing in the parantheses that precede your computer name and username. In the example below, I had to run conda deactivate twice.
(base) Your-Computer:~ Your-Username$ conda deactivate
(/Users/jw1/opt/anaconda3) Your-Computer:~ Your-Username$ conda deactivate
Your-Computer:~ Your-Username$ jupyter notebook
Then I was able to run jupyter notebook, and the code ran as expected.
I have also faced this problem number of times. I simply click the small square button (interrupt the kernel) beside Run button and click on Restart the kernel(with dialog) button (just beside square box) to run my program when struck on in [*].
The reason why it is happening is you are still talking to the same kernel instance in the second run, the variables from first run still exist and haven't been cleared.
This can be solved by adding this command before each run
%reset -f
I had a well set-up Windows machine with jupter installed and it was running fine. A week later,
> jupyter notebook
[I 12:18:13.640 NotebookApp] [nb_conda_kernels] enabled, 5 kernels found
And then nothing happens, Ctrl+z also doesn't work. My notebooks aren't running as the server is just not working.
Any way I can resolve the issue? I have a presentation with those notebooks!
Thanks.
First, it seems there is an existed jupyter server with unstable status. So if you are not sure what happened. Just try to reboot your computer.
Second, you can create a pure environment by conda create -n name python=x.x. Just remove anaconda. And then use pip install jupyter to install jupyter.