Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch Jupyter Notebook in windows without command window

Is it possible to launch jupyter notebook without command console, i.e, without typing jupyter notebook and having a command window in your opened programs. I have made a batch file which I double-click to open the jupyter notebook. However, this step opens a command window and prints all the communication between jupyter and python processes. I want to eliminate this commandline window.

like image 348
JeanVuda Avatar asked Apr 23 '18 15:04

JeanVuda


3 Answers

Instead of a batch file, one can use a shortcut.

To hide terminal you can run python scripts with pythonw.exe instead of python.exe. So I changed the Jupyter shortcut which was created after Anaconda installation accordingly. Mind that shortcut's Target field may have multiple python.exe instances, like the following:

C:\ProgramData\Anaconda3\pythonw.exe C:\ProgramData\Anaconda3\cwp.py C:\ProgramData\Anaconda3 C:\ProgramData\Anaconda3\pythonw.exe C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py "%USERPROFILE%/" Shortcut window screenshot

like image 159
ilia Avatar answered Oct 22 '22 07:10

ilia


This thread seems to be the first to appear when googling the problem.

My solution is for Anaconda users: Launch Jupyter from the Anaconda navigator. You won't have to keep an open CMD window, as upon exiting the navigator you are given the option to close or not close Jupyter.

Screenshot of Anaconda Navigator closing prompts.

like image 43
Jaimin Patel Avatar answered Oct 22 '22 06:10

Jaimin Patel


It appears from the following questions that what you want to do is tricky in windows:

  • https://superuser.com/questions/62525/run-a-batch-file-in-a-completely-hidden-way
  • How to call CMD without opening a window

Each of these questions has various work-arounds presented in the answers, each with their pros and cons. Perhaps one of them will meet your needs.

like image 1
Gordon Bean Avatar answered Oct 22 '22 07:10

Gordon Bean