Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Notebook: Terminals not available

Yesterday I had problems launching Jupyter Notebook (all of sudden I got the notification, that python was not working properly, but before everything was working well...). So I decided to upgrade to the latest python version. And now I can launch jupyter notebook, however I get this error message:

Terminals not available (error was No module named 'winpty.cywinpty')

I followed the setps descriebd here:

But still get this error message. Is there a way, to solve this? Or does anyone have an advise?

EDIT: This is what I get when I run jupyter notebook from the cmd:

[W 14:17:04.451 NotebookApp] Terminals not available (error was No module named 'winpty.cywinpty')
[I 14:17:05.073 NotebookApp] JupyterLab extension loaded from C:\Users\Fati\AppData\Local\Programs\Python\Python39\lib\site-packages\jupyterlab
[I 14:17:05.073 NotebookApp] JupyterLab application directory is C:\Users\Fati\AppData\Local\Programs\Python\Python39\share\jupyter\lab
[I 14:17:05.323 NotebookApp] Serving notebooks from local directory: C:\Users\Fati
[I 14:17:05.324 NotebookApp] Jupyter Notebook 6.1.5 is running at:
[I 14:17:05.326 NotebookApp] http://localhost:8888/?token=8e859b3108946a8310e1e5ceed6d2186c8731261fc5161eb
[I 14:17:05.330 NotebookApp]  or http://127.0.0.1:8888/?token=8e859b3108946a8310e1e5ceed6d2186c8731261fc5161eb
[I 14:17:05.331 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:17:05.448 NotebookApp]
like image 423
Fati Avatar asked Nov 24 '20 18:11

Fati


People also ask

How do I add a terminal to my Jupyter Notebook?

Click on spotlight, type terminal to open a terminal window. Enter the startup folder by typing cd /some_folder_name . Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.

Why Jupyter Notebook is not opening with terminal?

Jupyter doesn't load or doesn't work in the browser Try disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.

Why does Jupyter Notebook doesn't show output?

It is your expection that needs to be adapted. The Jupyter Notebook only shows what the last statement of a cell evaluates to. If you define a function, this does not evaluate to anything that could be displayed. So you can't see anything in the upper cell.


2 Answers

I had the same problem using Python 3.9 and resolved it by installing wheel and pywinpty using pipwin:

pip install pipwin

pip uninstall wheel

pipwin install wheel

pip uninstall pywinpty

pipwin install pywinpty

After restarting Jupyter the error is gone.

like image 145
Scott Roberts Avatar answered Oct 17 '22 00:10

Scott Roberts


Inspired by Scott Roberts' answer, using Python 3.9 I resolved the issue by updating pywinpty from version 0.5.7 to version 1.1.3:

pip install --upgrade pywinpty

like image 39
philipnye Avatar answered Oct 17 '22 00:10

philipnye