Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Jupyter Notebook from printing warnings / status updates to terminal

I love Jupyter's Notebook, however, it prints many, many updates to the terminal it was started from. For e.g., every time a file is saved manually or automatically, a line is printed. It makes the terminal virtually useless.

How do I stop it?

like image 647
saud Avatar asked Nov 06 '15 17:11

saud


People also ask

How do I stop a Jupyter notebook from running terminals?

NOTE: You can also shutdown a Jupyter Notebook session by clicking in the Terminal window and clicking Ctrl+c . You will be asked to confirm that you want to Shutdown this notebook server (y/[n])? . Type y and hit Enter to confirm. Then, you can close the Terminal by typing the command exit and hitting Enter .

How do I stop a Jupyter notebook from running in terminal Mac?

Normally it provides some details about the notebook but there should also be a message explaining how to kill it. I tried Cmd - C but it didn't work. Just close/exit the terminal window (as well as the web browser window/tab where the notebook is open). That terminates the processes running in the Terminal window.


2 Answers

import warnings; warnings.simplefilter('ignore') 

This would help you get rid of normal warnings.

like image 105
Qijun Liu Avatar answered Oct 02 '22 17:10

Qijun Liu


You can easily disable the warnings permantently by just adding the following code:

import warnings warnings.filterwarnings('ignore') 

to the following file:

~/.ipython/profile_default/startup/disable-warnings.py 
like image 39
Rene B. Avatar answered Oct 02 '22 16:10

Rene B.