Why does Jupyter Notebook stop working after a few seconds? - python

I have a problem with Jupyter and can't find anything by someone with the same experience. When I start Jupyter Notebook, it only lasts for a few seconds until it freezes. Sometimes it happens in the command prompt before my browser is opened, most of the times when I'm navigating through my directories and sometimes, if it really wants to rub it in, when I've finally opened a notebook.
I've tried reinstalling both Jupyter and Anaconda, but that didn't help. I've also tried different versions Jupyter and Python. This is what I do:
conda env create -n myname python=3.6 pip
activate myname
conda install jupyter OR pip install jupyter
jupyter notebook
I also tried installing from the Anaconda dashboard. Sometimes it works for a day and then a little later, I get the same problem again. The console also stops outputting data.
It doesn't seem to happen in the base environment.
Does anyone know how to fix it?

Related

Why aren't conda commands working in Spyder?

I recently downloaded Spyder using Python 3.9.12. For some reason, every time I try to use a conda command (such as conda activate env), the Spyder terminal gives the message 'Note: you may need to restart the kernel to use updated packages.' I've restarted the kernel multiple times, but the same message persists, essentially meaning that I cannot use conda commands in Spyder. However, they work fine in the regular Anaconda3 prompt. Does anyone know how to fix this? Thanks in advance!

Jupyter Notebook opens a blank page for all environments except base(root)

I am trying to follow the TensorFlow API documentation. I have done all the steps and activated my tensorflow_gpu environment. In the C:\TensorFlow\models\research\object_detection I typed "jupyter notebook" and it opens me a blank page http://localhost:8889/tree.
I tried to open the Jupyter Notebook in my base(root) and it opens the dashboard but for the other environments it only gives me a blank page.
How can I avoid that? Thank you.
I tried to delete and re-install jupyter notebook for that specific environments. I tried to upgrade and downgrade the version of it. Nothing worked yet.
You can still run the Jupyter Notebook in your base environment and make the notebook run with a different kernel (like if you are running the notebook in a different environment). In order to do so you need to install these packages in all of your environment:
conda install nb_conda nb_conda_kernels ipykernel
By doing so you will be able to see the kernels of all of your environments directly in base.
You will be able to start jupyter notebook in base, and once the notebook is running in your browser you can decide which kernel to use.
In the above picture I started Jupyter Notebook in my base environment, and having installed those packages in all the environments let me run any notebook with any kernel.
NB: My other environments are tf_lite1.13, tf_lite2, tf_night. Root will run the base kernel.

Windows 10 not opening jupyter notebook in Command Prompt

I tried to open the jupyter notebook using Command Prompt on Windows 10. Instead of it opening in the browser as it should, nothing happens.
I have downloaded jupyter using
pip install jupyter
pip install jupyter notebook
All this worked fine but when I type this in Command Prompt only a new line forms and nothing happens.
C:\Users\meena\OneDrive\Desktop\New folder>jupyter notebook
C:\Users\meena\OneDrive\Desktop\New folder>
I have tried to install jupyter many times but it doesn't work.
I only have python and not anaconda. So if someone else has the same problem and has tried anaconda please tell me so I can download it.
Have you tried typing jupyter-notebook and see if it works? I upgraded Anaconda recently, and typing jupyter notebook stopped working for some of my files, but I solved the problem by typing jupyter-notebook.

My Jupyter Notebook doesn't work properly

It worked well yesterday on Windows.
But in the morning today when I ran Jupyter in my environment and Chrome showed up, it didn't show anything but white.
Like this:
Webpage and Cmd.
I turned off the firewall, checked my hosts and runned
pip install --upgrade jupyterhub
But nothing happend.
I'm new so I don't know how to deal with it. I'll appreciate it if someone could help me out.
I find that I can run my jupyter if I click the shortcut "Jupyter Notebook" but I can't run it in my environment. Why?
I solved this problem. Here is the link
https://github.com/jupyter/notebook/issues/4467
The reason is that I'm using a newer version of Jupyter installed by command
conda install jupyter
which causes the trouble.

Jupyter Notebook Opening but no contents are visible

Screenshot of Jupyter Notebook Session:
I am trying to launch a Jupyter notebook using anaconda prompt. The browser session opens but no contents are visible on the page.
Does anyone have any idea how to mitigate this?
Screenshot of Anaconda Prompt:
Please refer to https://github.com/jupyter/notebook/issues/4467
I encounter similar trouble. So I just do 3 steps:
(1) uninstall Jupyter Notebook 5.7.6
conda uninstall notebook
(2) install old version
conda install notebook=5.7.4
(3) After lauching Jupyter Notebook 5.7.4
Press CTRL+R or CTRL+Shift+R to clear the cache
Then Jupyter Notebook works normally now.
Hope it's helpful to you.

Categories

Resources