Cells not running properly

I am new to JupyterLab, so I may have set things up incorrectly. I got a .ipynb file from my professor for homework. I am on a Mac and opened the file by going to Terminal and entering ‘jupyter lab’ and then navigating to the file in my browser. However, it seems that I’m getting multiple issues.

I added the ‘print(“Hello”)’ statement just to test if the first cell is run at all. When I run the first cell, the asterisk stays by it for close to 10 seconds (when I feel like it should run instantly). After the asterisk goes away, the number 1 does not show up in the box. And, no output is printed. Does anyone have any idea of what is going wrong?

The other issue is that the kernel randomly gets disconnected.

The terminal where you started it from should show you information you can use to follow up with details on what is happening.

If you just want to get past this hurdle, I will add that JupyterLab Dekstop should be the easiest way to install Jupyter. See here and make sure it read through the post how to use it as the project management model it assumes may be different than other ones with which you are familiar.

Thanks for the response. I tried it inside JupyterLab Desktop, but I’m still having the same issue. I notice that when I run a cell, I see the asterisk for about 10 seconds but then my kernel switches from “Python 3 (ipykernel)” to “No Kernel” and then that is when execution stops. So the issue is probably something with the kernel disconnecting. Do you have any idea what might be causing that?

I was able to solve this problem. Just posting here in case it helps anyone in the future. Apparently, I had ipykernel installed through both pip and anaconda. I only thought I had it on pip, so I was doing all the bug fixes (uninstalling and reinstalling, etc.) through pip. In the end, just had to uninstall and reinstall through anaconda and it worked.

1 Like

Yes, this is how Anaconda/conda works. If you opt to use it, it becomes your primary package manager and you need to use it as such and eschew pip. Mixing and matching is a recipe for headaches. Only using pip for anything where there isn’t a conda recipe is the way.

1 Like