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
Related
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 downloaded Anaconda Navigator months ago and have been using it to launch Jupyter Notebooks. Recently, I was trying to import Graphviz to visualize a decision tree and had a ton of trouble getting the package to work. I tried following various command line instructions that I read on forums, but somewhere in following some of those instructions, I must have completely messed up my conda environment. I am no longer able to open Anaconda. I tried uninstalling it and reinstalling (followed the directions for uninstalling it from the Anaconda documentation page). Everytime I try to reinstall it, it says the installation has failed or that it already exists on my computer.
I gave up on Anaconda and went ahead installing Jupyter Notebooks on its own. This worked just fine and I'm able to launch a kernel, but every time I try to execute code, it says the kernel has died and will automatically restarted.
I have gone down many rabbit holes...any help would be greatly appreciated!
I've been using the Fermipy conda environment on Python 2.7.14 64-bit on macOS Catalina 10.15.5 and overnight received the error "r.start is not a function" when trying to connect to the Jyputer server through Vscode (if I try on Jupyter Notebook/Lab the server instantly dies). I had a bunch of clutter on my system so I ended up formatting it and reinstalling all the dependencies needed (such as Conda through Homebrew, Fermitools through Conda and Fermipy through the install script on their site), but still get the same error, although I was previously running python scripts just fine. It gives me no other error or output, if it did I would attach it here. This is the error I get.
Edit: I get the same error using any version of Python 2.7.XX and not for python 3.7.XX.
As answered here, https://github.com/microsoft/vscode-python/issues/12355#issuecomment-652515770
VSCode changed how it launches jupyter kernels, and the new method is incompatible with python 2.7.
Add this line to your VSCode settings.json file and restart.
"python.experiments.optOutFrom": ["LocalZMQKernel - experiment"]
I got the same message. (r.start is not a function.) I had an old uninstalled version of anaconda on the computer which had left behind a folder containing its python version. Jupyter was supposed to be running from new venv after setting both python and jupyter path in vscode. I fully deleted remaining files from old anaconda install - message went away and notebook ran fine. Maybe try getting rid of all conda stuff and pip install jupyter and anything else you need.
I just installed Anaconda3.7, 64 bit for windows. I used Anaconda Navigator to launch jupyter notebook. The notebook opened, but when I try to launch a kernel/notebook I get the following error:
The code execution cannot proceed because python37.dll was not found. Reinstalling the program may fix this problem.
I even tried launching jupyter from the command prompt and the anaconda prompt but it doesn't work. In those cases, jupyter tries to restart the kernel 5 times and just quits after no success.
I have the python37.dll file inside the Anaconda3 folder next to the python.exe and I tried adding python37 to PATH, but nothing helps.
Any clue what might be the problem?
I solved the issues by doing 2 things:
I uninstalled Anaconda and deleted all hidden files and folders that had to do with conda, anaconda, jupyter and python that were created recently.
I disabled the antivirus and firewall while installing (it appears that they were blocking some dll and Anaconda files from being installed correctly).
I reinstalled Anaconda
I had the same problem with the firewall after installing anaconda. I tried creating a virtual environment with "conda env create -f "environment.yml" but it never completed the creation until I disabled the firewall and antivirus.
I hope this helps others with similar issues.
Errors related to python37.dll can arise for a few different reasons. For instance, a faulty application, python37.dll has been deleted or misplaced, corrupted by malicious software present on your PC or a damaged Windows registry.
For anaconda its caused due to pip installing library into anaconda environment instead of using the conda package manager.
So you can download a python37.dll file online and move it to you anaconda directory which should solve the issue.
Check this anaconda issue might be related
https://github.com/ContinuumIO/anaconda-issues/issues/1394
Hope it helps.
Any cells in Jupyter which have In [*] in front of them are not executing in Jupyter notebook. See image below:
I even restarted the kernel, without any improvement of the situation. Previous cells run without trouble. Every cell I added recently has the problem.
I recommend you the following steps:
Close ipython notebook, and then reopen the file.
If 1 does not work, then restart the kernel and reopen the file.
If 2 does not work, then try whether things work fine on console. Type ipython and check whether your code statements work.
If 3 does not work, try reinstalling the scientific python distribution if you are using Anaconda or Enthought.
I have encountered same problem on my windows machine.Try Jupyter with Anaconda on Windows will not run cells. Probably your antivirus program or your iis is blocking default 8888 port.
Downgrading tornado to 4.5.3 fixed my problem. with
pip - sudo python3.6 -m pip install tornado==4.5.3
conda - conda install tornado==4.5.3
use this for this bugs
You probably have a lot of notebooks(tabs) open with running kernels in them. You can check this by clicking on this icon 1 on the left. There you see all the running kernels in all your open notebooks and shut them down.2 This should solve your problem.