2

I've searched other posts and can't seem to find an answer that satisfies my issue with jupyter notebook. The notebook launches fine but keeps reconnecting the kernel and will not execute any code blocks. I just get a star in the brackets to the left and it never executes even a simple print statement. This is output from the jupyter notebook client:

[W 22:08:13.025 NotebookApp] Terminals not available (error was No module 
named 'winpty.cywinpty')
[I 22:08:13.027 NotebookApp] Serving notebooks from local directory: 
C:\Users\rsq2_\Downloads\RSQTest\venv\Scripts
[I 22:08:13.028 NotebookApp] The Jupyter Notebook is running at:
[I 22:08:13.028 NotebookApp] http://localhost:9999/? 
token=9777b5132d5ad6e00ddb64f3f6d4f8ca3a705f90ad515d7b
[I 22:08:13.028 NotebookApp] Use Control-C to stop this server and shut down 
all kernels (twice to skip confirmation).
[C 22:08:13.071 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://localhost:9999/? 
token=9777b5132d5ad6e00ddb64f3f6d4f8ca3a705f90ad515d7b
[I 22:08:13.189 NotebookApp] Accepting one-time-token-authenticated 
connection from ::1
[I 22:08:17.765 NotebookApp] Creating new notebook in
[I 22:08:19.113 NotebookApp] Kernel started: 610a6f8c-bf7f-45bc-9025- 
70896e912238
[I 22:08:20.386 NotebookApp] Adapting to protocol v5.1 for kernel 610a6f8c- 
bf7f-45bc-9025-70896e912238
[I 22:08:20.400 NotebookApp] Starting buffering for 610a6f8c-bf7f-45bc-9025- 
70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:21.420 NotebookApp] Adapting to protocol v5.1 for kernel 610a6f8c- 
bf7f-45bc-9025-70896e912238
[I 22:08:21.423 NotebookApp] Restoring connection for 610a6f8c-bf7f-45bc- 
9025-70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:21.434 NotebookApp] Starting buffering for 610a6f8c-bf7f-45bc-9025- 
70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:22.472 NotebookApp] Adapting to protocol v5.1 for kernel 610a6f8c- 
bf7f-45bc-9025-70896e912238
[I 22:08:22.476 NotebookApp] Restoring connection for 610a6f8c-bf7f-45bc- 
9025-70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:24.316 NotebookApp] Starting buffering for 610a6f8c-bf7f-45bc-9025- 
70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:25.382 NotebookApp] Adapting to protocol v5.1 for kernel 610a6f8c- 
bf7f-45bc-9025-70896e912238
[I 22:08:25.386 NotebookApp] Restoring connection for 610a6f8c-bf7f-45bc- 
9025-70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:25.389 NotebookApp] Starting buffering for 610a6f8c-bf7f-45bc-9025- 
70896e912238:69e5000561cf4ee6b54b9cc8e508446f
[I 22:08:26.424 NotebookApp] Adapting to protocol v5.1 for kernel 610a6f8c- 
bf7f-45bc-9025-70896e912238
[I 22:08:26.428 NotebookApp] Restoring connection for 610a6f8c-bf7f-45bc- 
9025-70896e912238:69e5000561cf4ee6b54b9cc8e508446f

I see that it says "Terminals not available" but not exactly sure how to fix that. I'm currently learning Python with video courses and jupyter notebook was suggested to use. So I don't have a background to know how to troubleshoot this. Thanks for the help! I'm running Win10 64bit.

EDIT: Not asking for password at all and yes, I used the token login the first time. Everything launches fine and creates new Python3 notebook files. But once in the notebook, it won't run any lines of code. I hit shift+enter to execute the cell and it just takes me to the next blank cell without executing anything.

enter image description here

enter image description here

enter image description here

Richard
  • 72
  • 1
  • 6
  • Are you using Anaconda? – Abu Shoeb Sep 19 '18 at 03:44
  • I don't believe so. Never did anything to explicitly start Anaconda. Just did a pip install of jupyter notebook and launched it. I have python3 installed on machine as well. Anything else I need to do? – Richard Sep 19 '18 at 07:48
  • I would recommend to download Anaconda and simply use the Anaconda Navigator. This is much easier to run Jupyter on Windows. Check https://www.anaconda.com/download/ – Abu Shoeb Sep 19 '18 at 16:31
  • I'll check it out. Thanks so much. – Richard Sep 20 '18 at 00:16
  • Just downloaded and launched Anaconda. Launched jupyter through that and getting exact same functionality. At a loss for how to fix. Any suggestions? – Richard Sep 20 '18 at 00:36
  • See the first line says no module found means you have to install that module. Can you just run a simple notebook with a print statement and see if it runs with no error? Then we can install the module to fix your current code. – Abu Shoeb Sep 20 '18 at 00:41
  • When I launch jupyter notebook, through Anaconda or otherwise, even a simple print statement will not complete. It just keeps trying to reconnect. For my regular coding, when I don't need the enhanced visuals of jupyter, I use PyCharm and it works great both in running scripts as well as using the python console. Also tried ipython shell and that works no problem as well. Have no idea what issue is with Jupyter and cannot find any online threads which solve the issue. – Richard Sep 20 '18 at 00:51
  • It asks you to use the authentication. Did you try this `http://localhost:9999/? token=9777b5132d5ad6e00ddb64f3f6d4f8ca3a705f90ad515d7b` to login your Jupyter notebook? – Abu Shoeb Sep 20 '18 at 03:23
  • I just found this `https://stackoverflow.com/questions/41159797/how-to-disable-password-request-for-a-jupyter-notebook-session` relavent to your problem. – Abu Shoeb Sep 20 '18 at 03:29
  • Possible duplicate of [How to disable password request for a Jupyter notebook session?](https://stackoverflow.com/questions/41159797/how-to-disable-password-request-for-a-jupyter-notebook-session) – Abu Shoeb Sep 20 '18 at 03:30
  • Yes, I've done the token and get same problem. It's never asked me for a password so that's not the issue. It opens up, I can create a new Python3 notebook file, and when I start typing code into the cells to run, it won't run. I do a simply print("testing") and nothing happens. On shift+enter, it moves to the next cell and the cell I typed in gets a star to the left and the connection icon at the top right just keep buffering and reconnecting to the kernel. It never runs the code, even if I restart kernel and run all cells. I'm at a loss. – Richard Sep 21 '18 at 01:43
  • I started running into that same problem today.. with notebooks that worked until a few days ago. I didn't upgrade any conda packages.. hmm.. – stmax Sep 29 '18 at 19:42
  • Anyone have any suggestions or somewhere to point me? I've read everything I can find and I have no idea how to get this working. Really would like to use it to learn visualization with pandas, etc. My python is installed at a different location than C:\Python32. Anyone know if that makes a difference? – Richard Sep 30 '18 at 02:47
  • @AbuShoeb, i added some screenshots above to try and help. I've looked at your links and those are not my problem. I've read everything i can find at stack overflow and github and haven't yet solved the problem. Seems like Kernel starts but then continues to buffer, reconnect, and timeout. I've updated conda, ipykernel, jupyternotebook, all current version. I'm lost and really need this to work. I greatly appreciate any help anyone can give. – Richard Sep 30 '18 at 12:41
  • @Richard ok let me set it up freshly on my Windows and then I'll share all steps to be followed. – Abu Shoeb Oct 01 '18 at 17:19
  • @Richard any updates on this ? thanks – Siddhant Tandon May 28 '20 at 07:15

2 Answers2

0

I had a similar issue. Going into Anaconda --> Environments and updating there the ipython and ipkernel modules seemed to solve this issue for me.

Iftach
  • 1
0

Try downgrading your version of Tornado. When conda upgraded Tornado to 6.0, I experienced similar problems with cells not executing.

$ conda install tornado=5.1.1

Tornado 5.7.5 was not available on a conda repo yet.

KT12
  • 549
  • 11
  • 24