Python Custom exe to open Jupyter Notebook w/ single click? (Win10)

  • Thread starter Thread starter deltapapazulu
  • Start date Start date
AI Thread Summary
A user sought a straightforward method to launch Jupyter Notebook on Windows 10 without using Anaconda, preferring to avoid its complexities. They initially opened Jupyter via the command prompt but wanted a clickable executable for convenience. Discussions included creating a desktop shortcut that executes the command "cmd /c jupyter notebook." However, the user faced issues with the notebook opening in the C:\Windows\System32 directory, which was slow and undesirable. To resolve this, they needed the shortcut to open Jupyter Notebook in their home directory (C:\Users\ME). After several suggestions, the user found success by adjusting the "Start in" property of the shortcut to their home folder, allowing for quick access from the taskbar. This solution effectively addressed their initial concerns, enabling a more efficient workflow with Jupyter Notebook.
deltapapazulu
Messages
84
Reaction score
13
TL;DR Summary
How create executable to start jupyter notebook w/o using command line.
Seems so trivial but haven't found good straightforward solution.

I've installed Jupyter Notebook on Windows 10 (using for Python & Julia) WITHOUT Anaconda. Don't like Anaconda for reasons not going to discuss here.

In order to start Jupyter Notebook you have to open command prompt and type in 'jupyter notebook'.

(here is my inquiry) I want to create an executable that I can click on from either desktop or task tray and it opens jupyter notebook without having to open a command prompt and typing in 'jupyter notebook'. Seems like it should be really simple to do this.

Anyone know how?
 
Technology news on Phys.org
Your start menu should have an Anaconda folder with a link to start Jupyter inside of it. Have you tried that?
 
Borg said:
Your start menu should have an Anaconda folder with a link to start Jupyter inside of it. Have you tried that?

I mentioned in my OP that have installed Jupyter Notebook WITHOUT Anaconda. Anaconda has tons of stuff that I don't need and has a history of conflicting with things in unexpected and unwanted ways, even outright breaking someone's configurations. 5 years ago Anaconda was horrible and many seasoned Python users advised against installing it. THAT SAID, supposedly Anaconda has worked out some of these issues since then but I still choose not to use it because its just a lot of bloat if all one is going to do is mess around with Julia in Jupyter Notebook.
 
right click -> New -> Shortcut -> location box -> cmd /c jupyter notebook
 
  • Like
Likes deltapapazulu
sysprog said:
right click -> New -> Shortcut -> location box -> cmd /c jupyter notebook

thank you that works but I need it to specifically use the cmd within my user profile C:/Users/ME

by the way I am assuming you mean place ' cmd /c jupyter notebook ' into the location box. Again, that works but what happens is it opens my whole C:/Windows/System32 directory in browser and that takes literally 12 seconds for it to finishing opening.
I need it to open in C:/Users/ME , my home folder just like if I were to open cmd from my User profile. The 'cmd' the way you said it uses the admin cmd in my root.
 
deltapapazulu said:
thank you that works but I need it to specifically use the cmd within my user profile C:/Users/ME

by the way I am assuming you mean place ' cmd /c jupyter notebook ' into the location box. Again, that works but what happens is it opens my whole C:/Windows/System32 file in browser and that takes literally 12 seconds for it to finishing opening.
I need it to open in C:/Users/ME , my home folder just like if I were to open cmd from my User profile. The 'cmd' the way you said it uses the admin cmd in my root.
C:\Windows\System32 is not a file; it's a directory, and it's opened by the Windows shell, explorer.exe; not by the browser.

In the shortcut location box, you can specify the path to the command, and/or to cmd:

right click -> New -> Shortcut -> location box -> C:\Windows\system32\cmd /c C:\Users\ME\jupyter notebook

or,

right click -> New -> Shortcut -> location box -> C:\Windows\system32\cmd /c cd C:\Users\ME & jupyter notebook

Unless you have an inordinately long %PATH% environment variable, which you can check by issuing the 'path' command from a command prompt, that's not going to be any faster than the path being found implicitly by the system looking through the list of directories specified in that variable.

Issuing the 'jupyter notebook' command from a shortcut should not cause it to run slower than than if it is manually issued from a command prompt.
 
Last edited:
sysprog said:
right click -> New -> Shortcut -> location box -> cmd /c jupyter notebook

sysprog said:
C:\Windows\System32 is not a file; it's a directory, and it's opened by the Windows shell, explorer.exe; not by the browser.

:In the shortcut location box, you can specify the path to the command, and/or to cmd:

right click -> New -> Shortcut -> location box -> C:\Windows\system32\cmd /c C:\Users\ME\jupyter notebook

But unless you have an inordinately long %PATH% environment variable, which you can check by issuing the 'path' command from a command prompt, that's not going to be any faster than the path being found implicitly by the system looking through the list of directories specified in that variable.

Issuing the 'jupyter notebook' command from a shortcut should not cause it to run slower than than if it is manually issued from a command prompt.

regarding when I called System32 a file, I realize it is a directory that was something akin to a typo, I went back and edited that minutes after I posted it. Sorry about that. Regarding when I said something about opening in browser what I meant was that when I run this command

C:\Users\JohnD>jupyter notebook

it opens Jupyter Notebook in my browser using

http://localhost:8888/tree

and the directory it does so with is my home folder.

Regarding how long it takes to do this, what is causing it to take so long is C:\Windows\system32 is a massive directory and that is what is taking it so long to finish opening in browser.

I'm working with some things will let you know if worked.

Thank you.
 
Please compare opening 'jupyter notebook' via shortcut, with/against opening it via typing it into the command prompt.
 
sysprog said:
Please compare opening 'jupyter notebook' via shortcut, with/against opening it via typing it into the command prompt.

I found solution. Thanks for your help. Honestly I was just being kind of lazy when I started this thread. Here is what I was looking for (see link below). Includes the step you mentioned.

I did what you said, then changed "start in" in shortcut properties to my home folder and that did what I needed. I put the shortcut into my taskbar and now all I have to do to start Jupyter Notebook with it starting from my home folder is click on the taskbar icon.

Launching Jupyter Notebook Using an Icon/Shortcut in the Current Working Directory Folder

or whatever directory you want depending on what you enter in the "start in" field.

Again thanks for help.

 
  • Like
Likes sysprog
Back
Top